Unable to associate boost.python with mingw

I already created boost.python lib by mingw, got two lib files:

  • libboost_python-mgw45-mt-1_46_1.a
  • libboost_python-mgw45-t-d-1_46_1.a

But I can not link these libraries in my test programs. And other components like regex work fine. I do not know how to solve this.

my user-config.jam:

using python : 2.7 : F:\\Programs\\Python\\python # cmd-or-prefix : F:\\Programs\\Python\\include : F:\\Programs\\Python\\lib : <toolset>gcc # condition ; 

and build command: bjam toolset = gcc --with-python

My enviroment:

  • python 2.7
  • mingw 4.5.1
  • boost 1.46.1
  • OS: windows xp

I hope I clearly explained my problem, I am not a native speaker of English. Any advice would be appreciated.

0
source share
1 answer

I don't know why (and I never really cared to figure it out for this reason), but Boost.Python refuses to bind statically in Windows. This is easy to solve, however - just rebuild it as a DLL ( bjam toolset=gcc --with-python link=shared ).

+2
source

All Articles