On 11/25/2011 10:06 AM, Edgardo C. wrote: > We have this situation(remember that the source code is from the book > API C++ design www.apibook.com <http://www.apibook.com>): > > Source code: > > - phonebook.h > - phonebook.cpp > - phonebook_wrap.cpp > > Boost is download, compiled and installed into: > - /Desktop/boost_1_48_0/compilation/ > > which means that /include and /lib are the subfolders of this with all > the headers and libraries into it. > > Now: > > g++ -c > phonebook.cpp > > (compiles only phonebook.cpp, without error) > g++ -c phonebook_wrap.cpp -I<boost_includes> -I<python_include> > (compiles the wrapper against the /include subfolder mentioned before > and the python2.7 headers in /usr/...) > g++ -shared -o phonebook.so phonebook.o phonebook_wrap.o > -lboost_python -lpython (links the objects agains the /lib subfolder > mentioned before and and python2.7 libraries in /usr/...)
Not sure whether this has anything to do with the symptoms you are observing, but I believe you should not link to the Python runtime, as that will be provided by the interpreter. (Some exotic platforms such as cygwin seem to require to link against -lpython anyhow, but certainly not GNU/Linux) FWIW, Stefan -- ...ich hab' noch einen Koffer in Berlin... _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig