Trying to cross compile Boost.Python using mingw

Hello all, I'm trying to cross compile boost python under linux to windows using the mingw32 compiler. Static linking works great, but when trying to make a dll, I get the following errors: gcc.link.dll bin.v2/libs/python/build/gcc-mingw-mingw32/release/target-os-windows/threadapi-win32/threading-multi/libboost_python-mt.dll.a /usr/bin/i686-w64-mingw32-ld: cannot find -lutil /usr/bin/i686-w64-mingw32-ld: cannot find -lpthread /usr/bin/i686-w64-mingw32-ld: cannot find -ldl collect2: ld returned 1 exit status My compile line is: b2 --with-system --with-date_time --with-python --with-filesystem --with-program_options -j 4 toolset=gcc-mingw32 target-os=windows threadapi=win32 variant=release --layout=tagged -sNO_BZIP2=1 -sNO_ZLIB=1 link=shared All the other libraries (system, date_time, program_options) generate dlls sucessfully. Any help is appreciated. Thanks!

AMDG On 03/17/2013 08:18 AM, Leonardo Sá wrote:
Hello all,
I'm trying to cross compile boost python under linux to windows using the mingw32 compiler. Static linking works great, but when trying to make a dll, I get the following errors:
gcc.link.dll bin.v2/libs/python/build/gcc-mingw-mingw32/release/target-os-windows/threadapi-win32/threading-multi/libboost_python-mt.dll.a /usr/bin/i686-w64-mingw32-ld: cannot find -lutil /usr/bin/i686-w64-mingw32-ld: cannot find -lpthread /usr/bin/i686-w64-mingw32-ld: cannot find -ldl collect2: ld returned 1 exit status
You need to make sure that you configure python for cross-compiling. i.e. in user-config.jam (or project-config.jam): using python : [version] : [cmd-or-prefix] : [includes] : [libraries] : <target-os>windows ;
My compile line is:
b2 --with-system --with-date_time --with-python --with-filesystem --with-program_options -j 4 toolset=gcc-mingw32 target-os=windows threadapi=win32 variant=release --layout=tagged -sNO_BZIP2=1 -sNO_ZLIB=1 link=shared
All the other libraries (system, date_time, program_options) generate dlls sucessfully.
In Christ, Steven Watanabe
participants (2)
-
Leonardo Sá
-
Steven Watanabe