Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29284 Discussions

About nafxcw.lib(afxmem.obj) : error LNK2005 ?

lyricx
Beginner
898 Views
When I built a full project which contains a Fortran project and a VC
project, in this full project, Fortran calls VC.
But when I built this full project using Visual Studio 2003, it can be
successful, but when I compile this full project, I encountered the following
error:
~~
nafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMT.lib(delete.obj)
Release/GA.exe : fatal error LNK1169: one or more multiply defined symbols found
~~
Someone can help to settle this problem? Thank you very much!
0 Kudos
1 Reply
Steven_L_Intel1
Employee
898 Views
I know I've seen this before, but I can't locate any earlier discussions. My memory says to add nafxcw.lib to the list of "additional dependencies" on the Linker Input property page. The problem has to do with the order in which the MSVC libraries are found.
0 Kudos
Reply