How can i use Scons to build SWIG lua example? -
How can i use Scons to build SWIG lua example? -
i trying write scons script build lua/embed3 illustration distributed swig. build instructions makefile follows:
swig -c++ -lua -external-runtime swigluarun.h swig -c++ -lua -module illustration -o example_wrap.cpp example.i g++ -o embed3 embed3.cpp example_wrap.cpp example.cpp \ -llua5.1 -i/usr/include/lua5.1
in scons wiki, it's said scons has builtin swig support. adding '.i' file among sources should job, unable find detailed description how can script can implemented.
following script builds lua/simple project under swig examples. however, unable find how execute first swig directive given in question. reply.
env = environment() env.append( swigflags = '-lua' ) env.append( cpppath = '/usr/include/lua5.1' ) env.append( libs = 'lua5.1' ) env.sharedlibrary( target = 'example.so', source = ['example.c', 'example.i' ], shlibprefix='' )
thanks in advance.
did try/see example script:
import distutils.sysconfig env = environment(swigflags=['-python'], cpppath=[distutils.sysconfig.get_python_inc()], shlibprefix="") env.sharedlibrary('_example.so', ['example.c', 'example.i'])
some more interesting details in this blog post.
lua swig scons
Comments
Post a Comment