[CMake] Problem with Intel Fortran and the Visual Studio 2008 generator
Hello, 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. In both cases I use CMake 2.8 and I use only default options. I always generate the solution/project files/makefiles in an empty directory. Any suggestions as to a solution? Regards, Arjen DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. ___ 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
Re: [CMake] Problem with Intel Fortran and the Visual Studio 2008 generator
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
Re: [CMake] Problem with Intel Fortran and the Visual Studio 2008 generator
Hi Brad, I am glad it was something this simple (even though with far-reaching consequences)! It is not something I could have found out myself. Regards, Arjen On 2010-09-28 16:18, Brad King wrote: 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 DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. ___ 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