Boost Python not linking uder Cygwin
Apologies for resending this email ... but for some reason my last email ended up as a reply for a completely disconnected subject.... TWICE.
I am able to build my Python Extension Module under MSVC 7.1, MSVC 8.0 and GCC (LINUX).
However I cannot seem to build it under Cygwin gcc.
The output of uname is CYGWIN_NT-5.1
The output of gcc -v is :
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/
info --enable-languages=c,ada,c++,d,f77,java,objc --enable-nls --without-included-gettext --enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib
ble-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug : (r
gured)
Thread model: posix
gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
My compile command line is :
g++ -o /cygdrive/c/Build/cygwin/gcc/3.4.4/Debug/Intermediate/PythonPapa/PythonPapa.dll -shared /cygdrive/c/Build/cygwin/gcc/3.4.4/Debug/Intermediate/PythonPapa/main.os /cygdrive/c/Build/cygwin/gcc/3.
.4/Debug/Intermediate/PythonPapa/StdVector.os -L/cygdrive/c/Build/cygwin/gcc/3.4.4/Debug -L/usr/local/lib -L/lib/python2.4/config -lPapaGateWay -lboost_python-gcc-mt-d-1_33_1 -lpython2.4 -lPapaGa
eWay
Then there are ALOT of errors .. here are the last few lines :
/usr/local/include/boost-1_33_1/boost/python/object/make_ptr_instance.hpp:(.text$_ZN5boost6python7objects14pointer_holderIPSt6vectorIdSaIdEES5_ED1Ev[boost::python::objects::pointer_holder
Nindi Singh
My compile command line is :
g++ -o /cygdrive/c/Build/cygwin/gcc/3.4.4/Debug/Intermediate/PythonPapa/PythonPapa.dll -shared /cygdrive/c/Build/cygwin/gcc/3.4.4/Debug/Intermediate/PythonPapa/main.os /cygdrive/c/Build/cygwin/gcc/3. .4/Debug/Intermediate/PythonPapa/StdVector.os -L/cygdrive/c/Build/cygwin/gcc/3.4.4/Debug -L/usr/local/lib -L/lib/python2.4/config -lPapaGateWay -lboost_python-gcc-mt-d-1_33_1 -lpython2.4 -lPapaGa eWay
Then there are ALOT of errors
Did you follow the advice here? http://www.boost.org/libs/python/doc/tutorial/doc/html/python/hello.html -- Dave Abrahams Boost Consulting www.boost-consulting.com
Firstly .. I apologise for posting my original mail here , I think I should have emailed to the Python list.
As for following the advice at http://www.boost.org/libs/python/doc/tutorial/doc/html/python/hello.html ..err no ... I did not I'm afraid, but on the other hand I am using scons as my underlying build system. However I did manage to solve my problem, be it not in the most elegant way.
Under Cygwin I built my Boost Python libraries with the line :
bjam --with--python
which gave me two boost_python libraries in /usr/local/lib (as well as others)
libboost_python-gcc-mt-d-1_33_1.a
libboost_python-gcc-mt-d-1_33_1.dll
When I was compiling with the g++ command below line I was getting my errors.
BUT when I renamed libboost_python-gcc-mt-d-1_33_1.a to libboost_python-gcc-mt-d-1_33_1.axx
( at this point I did not want to actualy delete the static library) the compilation was successful.
So I can only conclude that by default I was linking to the static library, and there was something wrong
with the doing that. Since I only ever wanted to link to the dll anyway ..... this solution suffices.
N
----- Original Message ----
From: David Abrahams
My compile command line is :
g++ -o /cygdrive/c/Build/cygwin/gcc/3.4.4/Debug/Intermediate/PythonPapa/PythonPapa.dll -shared /cygdrive/c/Build/cygwin/gcc/3.4.4/Debug/Intermediate/PythonPapa/main.os /cygdrive/c/Build/cygwin/gcc/3. .4/Debug/Intermediate/PythonPapa/StdVector.os -L/cygdrive/c/Build/cygwin/gcc/3.4.4/Debug -L/usr/local/lib -L/lib/python2.4/config -lPapaGateWay -lboost_python-gcc-mt-d-1_33_1 -lpython2.4 -lPapaGa eWay
Then there are ALOT of errors
Did you follow the advice here? http://www.boost.org/libs/python/doc/tutorial/doc/html/python/hello.html -- Dave Abrahams Boost Consulting www.boost-consulting.com _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
David Abrahams
-
Nindi Singh