Sorry. I didn't mean to answer directly to the person who posted. <br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Alain Leblanc</b> <span dir="ltr"><<a href="mailto:aalebl@gmail.com">aalebl@gmail.com</a>></span><br>
Date: 2009/10/8<br>Subject: Re: [CMake] Problem ignoring libcmt.lib on Windows<br>To: "Gooch, Allen" <<a href="mailto:agooch@bioware.com">agooch@bioware.com</a>><br><br><br>I was also struggling with this issue. I think I got it working. The only differences I have with what you do are:<br>
<br>1) I don't use the double quotes around the library name<br>2) I don't add the .lib in the library name.<br>
<br>I know very little about the MSVC compiler, so I don't know if it would make a difference, but it's probably worth a try.<br><br>a<br><br><br><div class="gmail_quote">2009/10/8 Gooch, Allen <span dir="ltr"><<a href="mailto:agooch@bioware.com" target="_blank">agooch@bioware.com</a>></span><div>
<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I have a project with a shared library target on Windows XPsp3 with VS2005/VS2008 using CMake 2.6 patch 4. It seems that CMake adds winmm.lib and libcmt.lib as a dependency automatically for me. I've tried to have this library ignored in one project, as it causes duplicate symbols. Based on my perusal of the docs and the mailing lists, I've added the following to my CMakeLists.txt file:<br>
<br>
set_target_properties (FooLib PROPERTIES LINK_FLAGS "/NODEFAULTLIB:\"libcmt.lib\"")<br>
<br>
This does not seem to affect behavior. When I open up the Linker->Input tab in my generated project's properties I still see libcmt.lib added to the end of "Additional Dependencies". The Linker->Command Line tab shows the /NODEFAULTLIB:"libcmt.lib" in the "All options" pane, as well as the libcmt.lib at the end. If I manually modify the "Additional Dependencies" field to remove libcmt.lib, my build completes as expected.<br>
<br>
I've tried various ways to specify the library to ignore, including quoting the library name and omitting the .lib suffix with no success. How do I achieve having libcmt.lib not show up in the "Additional Dependencies", or alternatively, have it actually ignored.<br>
<br>
Many thanks in advance,<br>
<br>
Allen Gooch<br>
Senior Server Programmer, BioWare<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div></div></div><br>
</div><br>