Volodya wrote:
There is a problem, because -lboost_xyz links with the dll import library boost_xyz.lib instead of libboost_xyz.lib. Sure, there is a way around it, but it requires an extra change to build on windows. It is a headache and I wish boost would compile the mingw libraries with a .a extension.
Can you clarify what exact naming scheme you want? Say, what should be the names for dynamic library, static library, and import library for boost_xyz?
I think everything would work if static libraries made with mingw and kin used .a as the extension instead of .lib. For example: boost_xyz.dll -- dynamic library boost_xyz.lib -- import library libboost_xyz.a -- static library The mingw compiler seems to prefer libboost_xyz.a over boost_xyz.lib, so it chooses the correct one.
It is particularly tricky to work around this one if you use SCons as a build system, since it incorrectly tries to demangle the library names,
NOTE TO SCONS USERS: Use LIBS=['liblibboost_xyz'] when linking with boost, since scons strips the first lib prefix.
Cool :-)
Yeah, but I wish scons did not strip the ixes by default.
Another option would be if static libraries would not include the 'lib' prefix on windows so that the mingw linker did not get confused. (This means the dll import library filenames would need different stems)
Hmm, I'm not sure I like this option.
Well, the current convention uses the presence or absence of a prefix that has another meaning to some tools. Anyhow, I prefer the first option: rename lib<name>.lib to lib<name>.a -- John