Problem compiling C++ code with python embedded
"Martin v. Löwis"
martin at v.loewis.de
Wed Oct 11 00:58:38 EDT 2006
vduber6er schrieb:
> g++ -Wall ibdws.cpp ../cgic205/cgic.c -oibdws.cgi -Lcgraph
> -lcgraph -Icgraph/Cgraph/source -I../cgic205 -L../cgic205
> -I/usr/include/python2.2 -L/usr/lib
> /python2.2/site-packages -lpython2.2
>
> but i get the following error when i build now:
>
> /usr/bin/ld: cannot find -lpython2.2
> collect2: ld returned 1 exit status
>
> Could someone help me out with this problem? I am not too good with
> linux so please explain to me in newbie steps. Thanks a lot.
I'm not sure I can explain it in newbie steps; I try with my own
words.
You need to find libpython2.2.a or libpython2.2.so on the new system.
You told the linker to look in /usr/lib/python2.2/site-packages
(in addition to the default locations: /lib and /usr/lib); it
wasn't there.
Try /usr/lib/python2.2/config as a directory instead. Check with
ls whether the file is there; don't try blindly.
Regards,
Martin
More information about the Python-list
mailing list