Hi, I am new to using swig and I encountered a problem while trying to get a small example project put together.
I am trying to figure out how to use C++ function in python using swig, but I can't seem to get it working. The problem is when I try to compile I get some errors.
I followed the tutorial for setting up a Microsoft Visual Studio Project here:
http://www.dabeaz.com/cgi-bin/wiki.pl?SwigFaqDLLForWindowsI'm using VS 2005.
I pretty much just wanted to duplicate the example from here:
http://www.swig.org/tutorial.htmlThe code in that tutorial is the code I used for the C++ function/header and the example.i that are in my project.
I next downloaded Swig from sourceforge the swigwin. I unzipped it.
I put the swig.exe in my project folder and tried to compile my project.
I get a bunch of "swig errors" of "Unrecognized option" this and that. Here is the exact errors:
------ Build started: Project: interfaceDLLexample, Configuration: Debug Win32 ------
SWIG
swig error : Unrecognized option and
swig error : Unrecognized option Settings\Blake
swig error : Unrecognized option Nicholas\Desktop\interfaceDLLexample\\interfaceDLLexample
swig error : Unrecognized option c:\Documents
swig error : Unrecognized option and
swig error : Unrecognized option Settings\Blake
Use 'swig -help' for available options.
Project : error PRJ0019: A tool returned an error code from "SWIG"
Build log was saved at "file://c:\Documents and Settings\Blake Nicholas\Desktop\interfaceDLLexample\interfaceDLLexample\Debug\BuildLog.htm"
interfaceDLLexample - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I am a newbie with swig. This is probably a pretty easy problem, but I can't really get it and I've tried a few different things.
Any other suggestions on setting something like this up that differ from the tutorials above would be great. I don't need to do anything fancy right now I just want to get a simple example module working in python like this example, and if I made any really newbie mistakes please let me know.
The solution can be downloaded here if anyone wants to see the project settings I have.
http://www.megaupload.com/?d=SEL82U2QThanks.