On 9/28/2010 6:35 AM, Arjen Markus wrote:
> for the PLplot project (http://plplot.sf.net) I have tried to use
> the Visual Studio 2008 generator in combination with Intel Fortran
> (version 11.1). Generating the solution and the project files
> works fine, but when I try to build it all, I get error messages
> about various symbols being doubly defined (in libcmt.lib - __aenvptr,
> __wenvptr, ___error_mode and ___app_type) and also a missing symbol
> in libifcoremt.lib (_MAIN__).
>
> These are system libraries that get included automatically during the
> link step.
>
> If I use the NMake Makefiles generator, however, all goes well.

I can reproduce this with VS 2008 and Intel 11.1 in 32-bit mode:

LIBCMT.lib(dllcrt0.obj) : error LNK2005: __aenvptr already defined in 
LIBCMT.lib(crt0.obj)
LIBCMT.lib(dllcrt0.obj) : error LNK2005: __wenvptr already defined in 
LIBCMT.lib(crt0.obj)
LIBCMT.lib(dllcrt0.obj) : error LNK2005: ___error_mode already defined in 
LIBCMT.lib(crt0.obj)
LIBCMT.lib(dllcrt0.obj) : error LNK2005: ___app_type already defined in 
LIBCMT.lib(crt0.obj)

Note that one comes from "dllcrt0.obj" and the other from "crt0.obj".
The build is mixing static and shared runtime libraries.

It looks like the Platform/Windows-ifort.cmake module is not getting
loaded for this generator.  This is due to a dumb bug in the language
information files.  I've pushed out a fix:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20f49730

-Brad
_______________________________________________
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

Reply via email to