ah sorry. Missed that one!
>>My solution is
>>1.Provide 6 different versions of the static library
>>2.Define a naming convention for naming the .lib file.
>>3.Provide a name decoration scheme that links in the
>>correct .lib file based on client project settings
I don''t see how this would work for me, since the issue at hand isn''t just with my library. Like I said, this library links with another static library whose creators apperantly weren''t as enlightened on these issues as you seem to be! :-)
My library is a sound system. The library I''m linking to is the Ogg Vorbis vorbisfile library, and a few other base ogg and vorbis libs. These libs were compiled against the multithreaded runtimes. There are no other versions provided in their SDK.
From what I gather from your article, I assume I''m pretty much hooped unless I can find a version of these other libraries that were compiled against the other c runtimes. Correct?
VC++ 6 Code Generation Settings
Yes, you are pretty much hooped.
The problem goes much deeper than that. Static libraries for C code is ok. If you are using C++, then
1. the client must use the same compiler. C++ name mangling is non-standard.
2. you force the client to use any 3rd party libs u link to explicitly or implicitly.
A very subtle example is STL library implementation. If your clients use a different STL library, you probably won''t get any linking errors but the results are gonna be ugly.
The problem goes much deeper than that. Static libraries for C code is ok. If you are using C++, then
1. the client must use the same compiler. C++ name mangling is non-standard.
2. you force the client to use any 3rd party libs u link to explicitly or implicitly.
A very subtle example is STL library implementation. If your clients use a different STL library, you probably won''t get any linking errors but the results are gonna be ugly.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement