I have project where I want to import library. When I do that (import .lib files from library) and than call any function from library I get following errors:
"C:\Uz\myproj.vcxproj" (default target) (1) ->(Link target) ->
aziotsharedutil.lib(consolelogger.obj) : error LNK2005: printf already defined in msvcrtd.lib(MSVCR120D.dll) [C:\Uz\myproj.vcxproj]
aziotsharedutil.lib(socketio_win32.obj) : error LNK2005: _vsnprintf_l already defined in msvcrtd.lib(MSVCR120D.dll) [C:\Uz\myproj.vcxproj]
uamqp.lib(amqpvalue_to_string.obj) : error LNK2005: _vsnprintf_l already defined in msvcrtd.lib(MSVCR120D.dll) [C:\Uz\myproj.vcxproj]
C:\Dz\myproj.vcxproj\myproj.dll : fatal error LNK1169: one or more multiply defined symbols found [C:\Uz\myproj.vcxproj]
0 Warning(s) 4 Error(s)
Does anyone know how can i fix this? I have following libraries imported in my project:
msvcprtd.lib
msvcrtd.lib
kernel32.lib
ole32.lib
aziotsharedutil.lib //imported Library .lib file
uamqp.lib //imported Library .lib file
eventhub_client.lib //imported Library .lib file
Advapi32.lib
Crypt32.lib
Ws2_32.lib
Secur32.lib
ucrt.lib
vcruntime.lib
Note 1
All 3 projects that are built as Static Link Library .lib, have same settings Multi-threaded Debug DLL (/MDd), same as my project.
Thanks!
Compiled with same version of compiler and that solved my problem!