[C++-sig] boost.python and MinGW3.4.2 with eclipse

Raoul Gough raoulgough at yahoo.co.uk
Thu Feb 21 23:25:12 CET 2008

[I think this is probably off-topic on this list - the c++-sig is for
Python/C++ integration, not boost topics in general]

--- Claudius Kehrhahn <claudius.kehrhahn at gmx.de> wrote:

> Then I started the tutorial of boost with the regex example. I had no
> problems with bjam as well with the following commands
> g++ -I P:\Programme\boost_1_34_1 example.cpp -o example -L 
> P:\Programme\boost_1_34_1\lib\ -lboost_regex-mgw34-mt-d-1_34_1
> and
> g++ -I P:\Programme\boost_1_34_1 example.cpp -o example 
> P:\Programme\boost_1_34_1\lib\libboost_regex-mgw34-mt-d-1_34_1
> but when I compiled and linked the example with eclipse I got the
> output:
> **** Internal Builder is used for build               ****
> g++ -IP:\Programme\boost_1_34_1 -O0 -c -fmessage-length=0 -oexample.o
> ..\example.cpp
> g++ P:\Programme\boost_1_34_1\lib\libboost_regex-mgw34-mt-d-1_34_1.a 
> -oTest_boost_libs.exe example.o

This link command won't work because the arguments are in the wrong
order. You need to put the objects with unresolved symbols first, so
the linker knows what symbols it's looking for when it processes the
library archive*. No idea why Eclipse would be getting this wrong.

* Actually there's another way to do it by wrapping linker arguments in
( and ) but you only need to do that if there are circular dependencies
between archives, which you never want anyway. 

> Furthermore I got lot of problems when I try to compile the python 
> tutorial 'hello.cpp'. I got massive compiler errors for the
> headerfiles 
> in ..\boost\python\
> Can anyone give me any hint how to continue?

Don't know, but you'd be better off asking on one of the general boost
mailing lists than here.


Rise to the challenge for Sport Relief with Yahoo! For Good  


More information about the Cplusplus-sig mailing list