Boost python static linking MinGW
<p>I'm trying to write a little wrapper for my library with boost python.
I use Cmake, mingw w64 and Python 3.4.</p>

<p>My Makefile seems like that:</p>

<pre><code># link python libs ...

set(Boost_USE_STATIC_LIBS OFF)  # focus on this line

# find boost and etc ...

add_library( some STATIC some.cpp ) # a maintainer library
add_library( wrap SHARED wrap.cpp )  # wrapper for python
target_link_libraries( wrap some ${Boost_LIBRARIES}  ${Python_LIBRARIES} )
# ...
</code></pre>

<p>That's rigth, build is successfuly, but in this case Boost links dynamically.</p>

<p><hr>
Supporse, I want a static link with Boost, I'm trying switch boost to static mode.</p>

<pre><code>set(Boost_USE_STATIC_LIBS ON)
</code></pre>

<p>Link crashs with a lot of errors.</p>

<blockquote>
  <p>wrap.cpp:(.text+0x75): undefined reference to _imp___ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE'</p>
  
  <p>wrap.cpp:(.text$_ZNK5boost6python9type_info4nameEv[__ZNK5boost6python9type_info4nameEv]+0x18): undefined reference to `_imp___ZN5boost6python6detail12gcc_demangleEPKc'</p>
</blockquote>

<p>and stuff like that.</p>

<p>I built Boost with --build-type=complete key, and I have <code>libboost_python-mgw53-1_60.a</code> exactly. I confused.</p>

<p>How can I fix it? </p>