List Info

Thread: boost.python and MinGW3.4.2 with eclipse




boost.python and MinGW3.4.2 with eclipse
user name
2008-02-21 15:58:28
I am a newbie to python, MinGW and eclipse. My background: I
have a lot 
experience in c++ with Visual Studio and embedded
programming with other 
compilers.

So, learning python is no really problem. I installed the
MinGW 3.4.2 
package, python 2.5, boost_1_34_1 and eclipse 3.3 with cdt
4.x.
I set a lot of constants for the path's to lib and include
directories, 
compiled the boost libraries/dlls with mingw.
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:Programmeboost_1_34_1 example.cpp -o example -L 
P:Programmeboost_1_34_1lib
-lboost_regex-mgw34-mt-d-1_34_1
and
g++ -I P:Programmeboost_1_34_1 example.cpp -o example 
P:Programmeboost_1_34_1liblibboost_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:Programmeboost_1_34_1 -O0 -c -fmessage-length=0
-oexample.o 
..example.cpp
g++
P:Programmeboost_1_34_1liblibboost_regex-mgw34-mt-d-1_34
_1.a 
-oTest_boost_libs.exe example.o
example.o(.text$_ZN5boost11basic_regexIcNS_12regex_traitsIcN
S_16cpp_regex_traitsIcEEEEE6assignEPKcS7_j[boost::basic_rege
x<char, 
boost::regex_traits<char,
boost::cpp_regex_traits<char> > >::assign(char 
const*, char const*, unsigned int)]+0x22):example.cpp:
undefined 
reference to `boost::basic_regex<char,
boost::regex_traits<char, 
boost::cpp_regex_traits<char> >
>::do_assign(char const*, char const*, 
unsigned int)'
collect2: ld returned 1 exit status
Build error occurred, build is stopped

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 ..boostpython

Can anyone give me any hint how to continue?

Thanks in advance.

Claudius
_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

Re: boost.python and MinGW3.4.2 with eclipse
user name
2008-02-21 16:25:12
[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.kehrhahngmx.de> wrote:

[snip]
> 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:Programmeboost_1_34_1 example.cpp -o example
-L 
> P:Programmeboost_1_34_1lib
-lboost_regex-mgw34-mt-d-1_34_1
> and
> g++ -I P:Programmeboost_1_34_1 example.cpp -o example

>
P:Programmeboost_1_34_1liblibboost_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:Programmeboost_1_34_1 -O0 -c
-fmessage-length=0 -oexample.o
> 
> ..example.cpp
> g++
P:Programmeboost_1_34_1liblibboost_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 ..boostpython
> 
> 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.

-- 
Cheers,
Raoul.


     
___________________________________________________________

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


http://uk.pro
motions.yahoo.com/forgood/
_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )