SCons FTW! :-) I built from source and tried it all again with bjam; no luck, same problems. So I figured, how hard can it be, it's just a DLL after all (renamed to .pyd). And sure enough it's not that hard. Here's a SConstruct that builds the tutorial example, wherever it is (does not have to be in the boost tree). I'm sure this could be generalized, but it's good enough for me as is.
# SConstruct for building boost python tutorial example import os boost_python_lib = 'boost_python-vc100-gd-1_54' boost_top = 'c:/boost' python_top = 'c:/python27' env=Environment(TARGET_ARCH='x86', CCFLAGS=['/MDd', '/DEBUG'], CPPPATH=[os.path.join(boost_top,'include/boost-1_54'), os.path.join(python_top, 'include')], LIBPATH=[os.path.join(boost_top, 'lib/i386'), os.path.join(python_top, 'libs')]) dll=env.SharedLibrary('hello_ext', 'hello.cpp', LIBS=boost_python_lib) env.InstallAs('hello_ext.pyd', dll[0]) # Copy the boost python lib into this dir so hello_ext will find it at runtime env.Install('.', os.path.join(boost_top, 'lib/i386', '%s.dll'%boost_python_lib))
_______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig