Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
7594 Discussions

libucrt.lib(nan.obj) : error LNK2005: nan already defined in libmmt.lib(nan.obj)

mikeitexpert
New Contributor II
441 Views

Dear Experts,

I am experience a link error :

OS: Windows 10

MSVC : 2019

ICC : Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.2.254 Build 20200623

xilink /nodefaultlib:vcomp /nodefaultlib:crt libiomp5md.lib -LIBPATH:Debug\lib -out:Debug/target.exe DEBUG/obj/target_object.obj lib_some_internal_lib.lib 
xilink: executing 'link'
Microsoft (R) Incremental Linker Version 14.26.28806.0
Copyright (C) Microsoft Corporation. All rights reserved.

/nodefaultlib:vcomp 
/nodefaultlib:crt libucrt 
libiomp5md.lib 
-LIBPATH:Debug\lib 
-out:Debug/ark_cpplab.exe 
DEBUG/obj/target_object.obj 
lib_some_internal_lib.lib 

libucrt.lib(nan.obj) : error LNK2005: nan already defined in libmmt.lib(nan.obj)
libucrt.lib(nanf.obj) : error LNK2005: nanf already defined in libmmt.lib(nan.obj)
Debug\target.exe : fatal error LNK1169: one or more multiply defined symbols found

 

Any comment is much appreciate it.

 

0 Kudos
3 Replies
mikeitexpert
New Contributor II
406 Views

Please let me know if there is any update on this. I googled pretty much everywhere and couldn't find a solution yet.

Regards

mikeitexpert
New Contributor II
400 Views

SUCCESS ... I don't know how and why it solved the problem but I just added /MD to compile flags and the issue sorted out. If I check Reference and Guide it says "Tells the linker to search for unresolved references in a multi-threaded, dynamic-link run-time library!"

RahulV_intel
Moderator
388 Views

Hi,


Since you have figured out the issue, I will go ahead and close this thread. Intel will no longer monitor this thread. However, it will remain open for community discussion.


--Rahul


Reply