Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
127 Views

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

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
Highlighted
92 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

0 Kudos
Highlighted
86 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!"

0 Kudos
Highlighted
Moderator
74 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


0 Kudos