472,142 Members | 1,251 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

Problem compiling C++ code with python embedded

Hello,

I just recently switched my code from one server to another and now
having some problems compiling my code. I was able to compile fine
with my last server now but this current one is giving me problems. My
build file is as follows

g++ -Wall ibdws.cpp ../cgic205/cgic.c -oibdws.cgi -Lcgraph -lcgraph
-Icgraph/Cgraph/source -I../cgic205 -L../cgic205
-I/usr/include/python2.4 -L/usr/lib
/python2.4/site-packages -lpython2.4

However, the new server only has python 2.2 so i simply switched the
2.4 to 2.2 so now my build file looks like this:

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.

Eric

Oct 10 '06 #1
1 1914
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
Oct 11 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by RJS | last post: by
3 posts views Thread by Zdenda | last post: by
5 posts views Thread by eq | last post: by
6 posts views Thread by Farshid Lashkari | last post: by
6 posts views Thread by Club-B42 | last post: by
2 posts views Thread by Ugo Di Girolamo | last post: by
1 post views Thread by Han-Wen Nienhuys | last post: by
3 posts views Thread by Sebastian Bassi | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.