[CMake] [VS] How to set static run-time for static lib release config?
Ryan Pavlik
rpavlik at iastate.edu
Fri Jul 30 08:11:30 EDT 2010
On 7/30/10 7:01 AM, Olaf van der Spek wrote:
> On Fri, Jul 30, 2010 at 1:52 PM, Ryan Pavlik<rpavlik at iastate.edu> wrote:
>> Almost nobody uses the static runtime unless someone else's lib forces them
> Why not?
> If Windows had proper package management I wouldn't use it either, but
> until then...
>
> Olaf
I'd only really just offer it as one option, in case a user of your
library is forced to use another library with the static runtime. It
doesn't mean that you don't have a static library without it, it just
means you aren't embedding the entire standard c/c++ runtime library
into yours, bloating memory usage, and inviting lots of symbol
collisions when versions don't quite match. Myself and my colleagues
have collectively lost significant hair on this one, and it took a while
for me to figure out exactly what it all meant since it's kind of
confusing. (and the error messages more so)
For more info:
http://msdn.microsoft.com/en-us/library/abx4dbyh%28VS.80%29.aspx
http://www.rationaldev.com/error_LNK2005_method_already_defined_in_LIBCMT_lib
http://support.microsoft.com/kb/94248 - see section 4 and 5
Ryan
--
Ryan Pavlik
Human-Computer Interaction Graduate Student
Virtual Reality Applications Center
Iowa State University
rpavlik at iastate.edu
http://academic.cleardefinition.com/
More information about the CMake
mailing list