Boost logo

Boost Users :

Subject: Re: [Boost-users] Trying to cross compile Boost.Python using mingw
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2013-03-18 11:13:34


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net