Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想boost::shared_Ptr使用 SWIG 将 Tcl 层公开。但目前我不知道我可以公开这个。我发现 SWIG/Lib 文件夹包含shared_ptr.i. 但是在内容中我发现不能直接使用。它必须包含在“ boost_shared_ptr.i”之后。但是boost_shared_ptr.i“ SWIG/Lib/tcl”文件夹中没有类似的东西,但我们有类似的界面,我可以将其包含在 Java 中。
boost::shared_Ptr
shared_ptr.i
boost_shared_ptr.i
SWIG/Lib/tcl
当我上次尝试时,所有 SWIG 都没有很好地支持 boost/shared_ptr。Python 的覆盖率最高。我很想知道这是否已经改变。
就我对 SWIG 的其他经验而言,您还需要使用 %template 为要公开的每种类型实例化模板。
你不能使用标准的 shared_ptr 吗?我的意思是 std::tr1::shared_ptr?在 gcc 中,您需要
#include <tr1/memory>