Skip to content

Instantly share code, notes, and snippets.

@kwharrigan kwharrigan/C3D.i

Created Feb 15, 2010
Embed
What would you like to do?
Swig script for C3D and related makefile
%module C3D
%{
/* Includes the header in the wrapper code */
#include "C3D.h"
#include "vl/vld.h"
%}
/* Parse the header file to generate wrappers */
%include "C3D.h"
%include cpointer.i
%include "std_vector.i"
%pointer_functions(int, intp);
namespace std{
%template(vector_Vec3D) vector<Vec3D>;
};
C3D: C3D.o C3D_wrap.o C3D.i
c++ -mno-cygwin -shared C3D.o C3D_wrap.o -o _C3D.pyd /c/Python25/libs/libpython25.a
C3D_wrap.cpp:
swig -c++ -python C3D.i
mv C3D_wrap.cxx C3D_wrap.cpp
C3D.o C3D_wrap.o: C3D_wrap.cpp
g++ -c C3D.cpp C3D_wrap.cpp -I/c/Python25/include -Ivl-1.3.2/include -D__int8=char -D__int16=short -D__int32=int "-D__int64=long long"
clean:
rm -f *.o
rm -f C3D_wrap.cpp
rm -f _C3D.pyd
rm -f C3D.pyc
rm -f C3D.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.