swig

    0热度

    1回答

    我有一个C++类的方法是这样的: class BinaryData { public: ... void serialize(unsigned char* buf) const; }; serialize功能只得到二进制数据unsigned char*。 我使用SWIG来包装这个类。 我想在python中读取二进制数据byte array或int array。 Pyt

    0热度

    1回答

    在我.i文件我有很多这样的矢量模板: %template(VectorInt) std::vector<int>; 我有必要采取这些载体之一,并构建任何类型的载体包含一个实例。 我知道我可以得到矢量的类型,并使用我对命名约定的知识来计算出与所需类型相同的字符串,并从中调用构造函数。 我不能指望矢量不是空的。 有没有更可靠的方法来获取这些信息?

    0热度

    1回答

    我正在尝试用swig创建一个包装器,以便与Golang一起使用静态库(* .a)。 我使用的是mylib.swigcxx文件触发Golang调用痛饮有以下选项: swig -go -cgo -intgosize 64 -module mylib \ -o $WORK/mylib/_obj/mylib_wrap.cxx \ -outdir $WORK/mylib/_obj/ \ -I/myli

    1热度

    1回答

    我有代码包裹着两个pybind11和swig,但似乎无法找到如何正确获取PyPI上的代码,所以我可以pip install我的包文档。 Pybind11 seems to have issues that make it difficult to put code on pypi。 我想我想要的是为Linux构建二进制轮圈& OSX,但我找不到有关此的许多文档。 Some people do th

    0热度

    1回答

    我对TCL相对比较陌生,我试图在Windows 10上使用SWIG执行C++程序。使用命令提示符。我没有使用Visual Studio 我基本上尝试使用C++的MinGW从TCL C:\swigwin-3.0.12\Examples\r\class>swig -c++ -tcl example.i` C:\swigwin-3.0.12\Examples\r\class>g++ -c exampl

    0热度

    1回答

    如果我想打印约在C++对象的信息,我将使用outstream运营商<<: class Foo { public: friend std::ostream& operator<<(std::ostream& out, const Foo& foo); private: double bar = 7; }; inline std::ostream& operator<<

    1热度

    1回答

    我试图SWIG涡卷(版本3)INT的C++ STL地图一类的指针,到Python 3: example.h文件 #include <map> using namespace std; class Test{}; class Example{ public: map<int,Test*> my_map; Example() { int a=0;

    1热度

    1回答

    我试图将C++和Python结合起来,为此我使用了CMake。在CMakeLists.txt中,我试图找到一个程序: # Check for Gmsh executable find_program (GMSH gmsh [/Applications/Gmsh.app/Contents/MacOS/ /usr/bin/ /usr/local/bin/]) if(GMSH) mess

    0热度

    1回答

    我在C代码中有以下变量,其中我在2D数组中存储了一些变量。我想在python中访问这个数组。我得到以下info..How我可以从阵列 的module.c uin32_t array_vaiable[10][100] module.h中 extern uint32_t array_variable[10][100] module.i %module mod %{ #include

    0热度

    1回答

    我想使用android studio 2.3构建本机android应用程序的例子,但坚持在一个点。该项目的代码如下 MainActivity.java package com.example.angelica.testfive; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import