I am trying to compiling an autodiff python library, pyadolc, on Windows with Mingw. It requires boost python to call the underlying c++ library, adol-c.
I first compiled boost_python library (dll) with mingw. The dll generated are namead as libboost_python-mgw46-mt-1_53.dll and libboost_python-mgw46-mt-1_53.dll.a, sitting in /mingw/bin and /mingw/lib respectively.
Then when I build the pyadolc, the build script tries with command -lboost_python. It failed because the dll is named as libboost_python-mgw46-mt-1_53.dll, not libboost_python.dll.
So I renamed the dll as libboost_python.dll in /mingw/bin. It works and everything links fine.
However, when I tred in python shell
import adolc
it gave me an error: ImportError: No dll found for _adolc (something like that). Then I found that it was because it was looking for libboost_python-mgw46-mt-1_53.dll.
My question is: how does the dll naming work? what's the proper way to handle this kind of situation? Should I modify the build script or should I just rename the dll? I know in linux, I probably can just create a symbolic link of libboost_python.so to libboost_python-xxxx-mt-1_53.so. But in Windows xp, symbolic link to a file is not that easy.
The best possibility is to change your build script to point to -lboost_python-mgw46-mt-1_53.dll
If you rename  libboost_python-mgw46-mt-1_53.dll you have to rename libboost_python-mgw46-mt-1_53.dll.a to.
Often have dll's a reciprocal reference, if you now, only renames, the original names are not found.
So do not rename, instead use copy
copy
libboost_python-mgw46-mt-1_53.dll.a to libboost_python.a
and copy
libboost_python-mgw46-mt-1_53.dll to libboost_python.dll
With this method you have both versions.
How should I handle an "incorrectly" named dll?