0

I have already build boost.python lib by mingw,Got two lib files:

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

But I cant link these libs in my test programs.And the other components like regex works fine.I dont 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 the build command: bjam toolset=gcc --with-python

My Enviroment:

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

Hope I explained my problem clearly, I'm not english native speaker. Any advise will be appreciate.

ShirenY
  • 3
  • 4

1 Answers1

2

I don't know why (and I never really cared enough to dig for the reason), but Boost.Python refuses to link statically on Windows. This is easily solved, though — just rebuild it as a DLL (bjam toolset=gcc --with-python link=shared).

Cat Plus Plus
  • 125,936
  • 27
  • 200
  • 224