Error al enlazar librerias en VC++
Publicado por Luis (8 intervenciones) el 11/10/2007 16:33:35
Hola a todos, tengo un problema al intentar crear una librería de enlace dinámico Win32, un dll en Visual C++. Al compilar no me da errores, pero al darle al botón de BUILD, comienza el problema, y es que no sé que le puede pasar para que me dé esos errores que muestro más abajo:
Linking...
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _memmove already defined in LIBCMTD.lib(memmove.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _sprintf already defined in LIBCMTD.lib(sprintf.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _atol already defined in LIBCMTD.lib(atox.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _realloc already defined in LIBCMTD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _atoi already defined in LIBCMTD.lib(atox.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _abort already defined in LIBCMTD.lib(abort.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strchr already defined in LIBCMTD.lib(strchr.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __stricmp already defined in LIBCMTD.lib(stricmp.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _printf already defined in LIBCMTD.lib(printf.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _getenv already defined in LIBCMTD.lib(getenv.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fflush already defined in LIBCMTD.lib(fflush.obj)
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _memmove already defined in LIBCMTD.lib(memmove.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _sprintf already defined in LIBCMTD.lib(sprintf.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _atol already defined in LIBCMTD.lib(atox.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _fclose already defined in LIBCMTD.lib(fclose.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _realloc already defined in LIBCMTD.lib(dbgheap.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _malloc already defined in LIBCMTD.lib(dbgheap.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _atoi already defined in LIBCMTD.lib(atox.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _free already defined in LIBCMTD.lib(dbgheap.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _exit already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _abort already defined in LIBCMTD.lib(abort.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _strchr already defined in LIBCMTD.lib(strchr.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: __stricmp already defined in LIBCMTD.lib(stricmp.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _printf already defined in LIBCMTD.lib(printf.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _getenv already defined in LIBCMTD.lib(getenv.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _fflush already defined in LIBCMTD.lib(fflush.obj); second definition ignored
Creating library Debug/dll.lib and object Debug/dll.exp
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4049: locally defined symbol ""int INFO_FLAG" (?INFO_FLAG@@3HA)" imported
Debug/dll.dll : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
dll.dll - 16 error(s), 17 warning(s)
Espero que alguien me pueda aconsejar sobre qué librerías debo poner, quitar, o que configuraciones debo tocar para que el fichero dll se me ejecute correctamente y pueda crear la dll, de modo que la pueda usar para mis propósitos específicos.
Un saludo, y espero que alguien me pueda ayudar lo antes posible ya que no le encuentro solución, llevo varios días con este tema y estoy un poco amargado , jejeje, y es un poco urgente.....
Gracias de antemano....
Linking...
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _memmove already defined in LIBCMTD.lib(memmove.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _sprintf already defined in LIBCMTD.lib(sprintf.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _atol already defined in LIBCMTD.lib(atox.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _realloc already defined in LIBCMTD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _atoi already defined in LIBCMTD.lib(atox.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _abort already defined in LIBCMTD.lib(abort.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strchr already defined in LIBCMTD.lib(strchr.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __stricmp already defined in LIBCMTD.lib(stricmp.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _printf already defined in LIBCMTD.lib(printf.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _getenv already defined in LIBCMTD.lib(getenv.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fflush already defined in LIBCMTD.lib(fflush.obj)
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _memmove already defined in LIBCMTD.lib(memmove.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _sprintf already defined in LIBCMTD.lib(sprintf.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _atol already defined in LIBCMTD.lib(atox.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _fclose already defined in LIBCMTD.lib(fclose.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _realloc already defined in LIBCMTD.lib(dbgheap.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _malloc already defined in LIBCMTD.lib(dbgheap.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _atoi already defined in LIBCMTD.lib(atox.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _free already defined in LIBCMTD.lib(dbgheap.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _exit already defined in LIBCMTD.lib(crt0dat.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _abort already defined in LIBCMTD.lib(abort.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _strchr already defined in LIBCMTD.lib(strchr.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: __stricmp already defined in LIBCMTD.lib(stricmp.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _printf already defined in LIBCMTD.lib(printf.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _getenv already defined in LIBCMTD.lib(getenv.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _fflush already defined in LIBCMTD.lib(fflush.obj); second definition ignored
Creating library Debug/dll.lib and object Debug/dll.exp
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4049: locally defined symbol ""int INFO_FLAG" (?INFO_FLAG@@3HA)" imported
Debug/dll.dll : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
dll.dll - 16 error(s), 17 warning(s)
Espero que alguien me pueda aconsejar sobre qué librerías debo poner, quitar, o que configuraciones debo tocar para que el fichero dll se me ejecute correctamente y pueda crear la dll, de modo que la pueda usar para mis propósitos específicos.
Un saludo, y espero que alguien me pueda ayudar lo antes posible ya que no le encuentro solución, llevo varios días con este tema y estoy un poco amargado , jejeje, y es un poco urgente.....
Gracias de antemano....
Valora esta pregunta


0