• Advertisement
Sign in to follow this  

Problems building Boost.python for GCC

This topic is 4582 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone! Ok, i've downloaded all the Boost stuff and got bjam.exe and all of that. Now, in the tutorial im following located here: Here I run the command bjam -sTOOLS=gcc test as instructed, but it failes, after a few seconds of a ¤"&%load of output to the screen, i scroll back and see lots of errors, and one thing in perticular caught my eye, which is this:
...failed gcc-C++-action ..\..\..\bin\boost\libs\python\build\libboost_python.li
...skipped <@boost!libs!python!build\libboost_python.lib\gcc\debug>libboost_pyth
on.lib for lack of <@boost!libs!python!build\libboost_python.lib\gcc\debug>numer
gcc-C++-action ..\..\..\bin\boost\libs\python\test\embedding.test\gcc\debug\embe
In file included from C:/boost_1_32_0/boost/python/detail/prefix.hpp:13,
                 from C:/boost_1_32_0/boost/python/args.hpp:8,
                 from C:/boost_1_32_0/boost/python.hpp:11,
                 from ../../../libs/python/test/embedding.cpp:9:
C:/boost_1_32_0/boost/python/detail/wrap_python.hpp:30:23: pyconfig.h: No such f
ile or directory
C:/boost_1_32_0/boost/python/detail/wrap_python.hpp:54:24: patchlevel.h: No such
 file or directory
I know its a bit much, but look at the last few lines, it says it cant find the pyconfig.h and other python includes. This is strange cause ive set up all the enviroment variables like instructed. I put them in a commandscript of my own which looks like this:
@set PYTHON_ROOT=c:\python24@set PYTHON_VERSION=2.4
@set PYTHON_INCLUDES=c:\python24\include@set PYTHON_LIB_PATH=c:\python24\libs
@set GCC_BIN_DIR=c:\dev-cpp\bin@set GCC_LIB_DIR=c:\dev-cpp\lib@set GCC_INC_DIR=c:\dev-cpp\include
Sorry for all this text, i know it might be a bit hard to pinpoint what my problem is, but i was hoping someone else has had this as well and might know of a solution :) Anyway im greatful for any help on this, and let me know if im unclear about something or if u want more info from me. If you're still reading this... thanks for listening! :)

Share this post

Link to post
Share on other sites
The most likely problem is that your python installation is borked. Make sure that C:\python24\include has the pyconfig.h and patchlevel.h headers. The other possibility is that your @sets are borked because you've run them together on one line. Like this line:

@set PYTHON_INCLUDES=c:\python24\include@set PYTHON_LIB_PATH=c:\python24\libs

Looks like should be two lines instead of one. Of course that could be a forum formatting error.

One thing to try is manually adding the boost::python src files to your project and building independently of bjam. You'll need to do a project level define for BOOST_PYTHON_STATIC_LIB and uncomment the #define BOOST_ALL_NO_LIB line in boost/config/user.hpp.

Share this post

Link to post
Share on other sites
Thanks for your reply SiCrane!

( And sorry for my late reply ;) )

I did as you instructed but to no avail. Building the sources myself brought
me some more headaches, and after peeking at documentation here and there,
i decided to look at alternatives so i tried SWIG which worked much better
for me.

However, i do have some questions about that also, but i think it belongs in
a new post so its easier for someone else with the same question finding
that post.

Anyway thanks a million for your help! :)

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement