How can I build this simple C++/SWIG/C# project in Visual Studio 2010?

后端 未结 2 1953
忘掉有多难
忘掉有多难 2021-01-31 06:08

I need help setting up a simple C++/C# SWIG project. I am having a hard time putting together a C++ project that uses the SWIG bindings. I\'m using Visual Studio 2010 and the

2条回答
  •  野性不改
    2021-01-31 07:04

    I've only used SWIG a small amount but it looks like you're trying to export a function named times() in your .i file which doesn't exist. You do have a cpp_file::times() method but that is not exported. You either need to define the times() function or export the entire cpp_file class via SWIG.

    I would spend some time reading the official SWIG documentation, particularly the SWIG and C++ section. There is also this question on SO which has some information related to SWIG and VS2010.

提交回复
热议问题