[CMake] Linking error with VS2005

Philip Lowman philip at yhbt.com
Fri May 21 11:30:05 EDT 2010


It also may be caused by linking code compiled with /MT against code
compiled with /MD (or vice versa).

On Fri, May 21, 2010 at 10:48 AM, Chuck Atkins <chuck.atkins at kitware.com>wrote:

> Does the problem happen in both Debug and Release builds?
>
> Visual C++ has a well known problem of mixing debug and release libraries
> together.  My suspicion is that you have some dependant libraries that are
> only built in Debug or only built in Release.  With Visual C++ it is
> important that all libraries and dependencies as well as the project code
> it's self be built in the same "Build Configuration" (Debug or Release).
> Mixing the two will often give rise to problems such as these.
>
> Chuck Atkins
>
>
> -- "Mathematicians are tools for turning coffee grounds into formulas.",
> Paul Erdos
>
>
> On Fri, May 21, 2010 at 8:01 AM, Daanen Vincent <daanen at koelis.com> wrote:
>
>> Dear Cmake users,
>>
>> I'm facing to a problem I can't resolve.
>> I'm developping on a windows XP SP3 box with Visual Studio 2005.
>>
>> I have a project using itk which compile fine.
>> For  some reason, I try to use cmake to generate the "same" project and I
>> got linker error (conflict between msvcrtd.lib and libcmtd.lib)
>>
>> - I check that the librairies are declared in the same order in both
>> project
>> and it's ok
>> - Try to ignore either msvcrtd.lib or libcmtd.lib but I does not work :
>> other linker errors appear.
>>
>> I could not find what is specifically added by cmake so that the
>> "cmake-generated" project fails to build the binray whereas the
>> "manually-generated" project file succeeds...
>>
>> Is there someone who could help me ?
>>
>> Thanks
>>
>>  Vince
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100521/8537a622/attachment.htm>


More information about the CMake mailing list