How to compile SWIG via windows
I've downloaded swigwin, sigwin for windows, and have been checking examples. However, most examples have to compile like this: swig -example.i. I tried doing this over the cmd prompt but it does not work. Can you please teach me how I can do this 开发者_如何转开发on windows?
You have to choose a language. To create a Python extension wrapper for C:
swig -python example.i
for C++:
swig -python -c++ example.i
See swig -help.
You may also need to add swig to your path. Something like:
path c:\swigwin-2.0.0;%path%
Or add it through Control Panel, System, Advanced, Environment Variables (on WinXP).
Given the fact that you're asking about compilation, I'll like to add two things (knowing there already is an excepted answer):
- I've come here from Google looking for how to compile on Windows, and the
swigcommand does not compile anything. It just translates given input to (in my case).javaand a*_wrap.cfiles, which is uncompiled source code - in order to compile - in terms of using the
gccorg++commands from SWIG's tutorial - you have to install a compiler. The Windows examples describes three options: Visual Studio, Cygwin or MinGW (download here). To compile the.javafiles from above just usejavac; for details see the according "Building a module"-section in the tutorials.
加载中,请稍侯......
精彩评论