[Solved] Linking with binary libraries compiled with other MSVC version
-
From an ABI (Application Binary Interface) view this should not make any difference. It's more a question of SP1 or not. I once got bitten by this when I used the precompiled libs that the Trolls provide; these were built with VS2005+SP1, I had no SP1 installed (and could not upgrade for some reason). I could not link my application against these DLLs and went off to compile Qt by hand, so that they depend on the very same libs and version my installation provided.
I know, all this is a big nightmare :-(
If you can grab the sources of the lib you use, it would be best to compile it yourself.
-
yes, Volker is right about SP1 and it can be a root of problem I think.
-
Linking is safe (fails at build time), the painful part comes when you use the library and when deploying. Definitely not a recommended thing to do.
-
[quote author="razvanpetru" date="1291282169"]Linking is safe (fails at build time), the painful part comes when you use the library and when deploying. Definitely not a recommended thing to do.[/quote]
When I install service pack then the used library is the same. Thank you for recommendation.
-
[quote author="Volker" date="1291290350"]You must install both runtimes (MSVCRT, MSVCP) on the target machine. There are installers from Microsoft for that (vcredist exe or an MSI include); you must execute both .exe or include both MSI snippets.[/quote]
Thanks. It seems that I can eliminate library without SP1.