/
Inicio :: Foros

 F.A.Q.F.A.Q.                  Conéctese para revisar sus mensajesConéctese para revisar sus mensajes   

Error de linkado en vc++

 
      Índice del Foro elrincondelc.com -> Principiantes C/C++
Ver tema anterior :: Ver siguiente tema  
AutorMensaje
psino



Registrado: 31 Ago 2007
Mensajes: 2

MensajePublicado: 03/09/2007 12:09 am
Título: Error de linkado en vc++

Tengo un problema y llevo varios dias comiendome la cabeza y no consigo salir de el, os explico:

Tengo una aplicacion compilada en VC++(no es MFC), quiero poder abrir y escribir cosas en un documento word. Para ello he creado un proyecto nuevo como "DLL de MFC".
En el .h de la clase donde voy a usar la funcion de la libreria le he añadido #include <stdafx.h> y #include <nombre_de_mi_dll.h> (en ese orden).
Al compilar me dan los siguientes errores:

msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: void __thiscall std::locale::facet::_Incref(void)" (?_Incref@facet@locale@std@@QAEXXZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) en CFrameEditor.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) en CFrameEditor.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: __thiscall std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::~basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >(void)" (??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@XZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: __thiscall std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >(unsigned short const *)" (??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG@Z) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: class std::basic_ostream<unsigned short,struct std::char_traits<unsigned short> > & __thiscall std::basic_ostream<unsigned short,struct std::char_traits<unsigned short> >::flush(void)" (?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: void __thiscall std::basic_ostream<unsigned short,struct std::char_traits<unsigned short> >::_Osfx(void)" (?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::append(unsigned int,char)" (?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::max_size(void)const " (?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) en CFrameEditor.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) en CFrameEditor.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: __thiscall std::locale::~locale(void)" (??1locale@std@@QAE@XZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: class std::locale __thiscall std::ios_base::getloc(void)const " (?getloc@ios_base@std@@QBE?AVlocale@2@XZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: unsigned int __thiscall std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::max_size(void)const " (?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > & __thiscall std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@II@Z) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: unsigned short __thiscall std::basic_streambuf<unsigned short,struct std::char_traits<unsigned short> >::sputc(unsigned short)" (?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: int __thiscall std::ios_base::width(int)" (?width@ios_base@std@@QAEHH@Z) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: int __thiscall std::ios_base::width(void)const " (?width@ios_base@std@@QBEHXZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: __thiscall std::locale::id::operator unsigned int(void)" (??Bid@locale@std@@QAEIXZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::size(void)const " (?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) en CFrameEditor.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@QBEHXZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: bool __thiscall std::ios_base::good(void)const " (?good@ios_base@std@@QBE_NXZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: void __thiscall std::basic_ios<unsigned short,struct std::char_traits<unsigned short> >::setstate(int,bool)" (?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: static bool __cdecl std::char_traits<unsigned short>::eq_int_type(unsigned short const &,unsigned short const &)" (?eq_int_type@?$char_traits@G@std@@SA_NABG0@Z) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: static unsigned short __cdecl std::char_traits<unsigned short>::eof(void)" (?eof@?$char_traits@G@std@@SAGXZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: class std::basic_streambuf<unsigned short,struct std::char_traits<unsigned short> > * __thiscall std::basic_ios<unsigned short,struct std::char_traits<unsigned short> >::rdbuf(void)const " (?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: void __thiscall std::basic_streambuf<unsigned short,struct std::char_traits<unsigned short> >::_Unlock(void)" (?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: void __thiscall std::basic_streambuf<unsigned short,struct std::char_traits<unsigned short> >::_Lock(void)" (?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: unsigned int __thiscall std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::size(void)const " (?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: static unsigned short __cdecl std::char_traits<unsigned short>::to_int_type(unsigned short const &)" (?to_int_type@?$char_traits@G@std@@SAGABG@Z) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: unsigned short __thiscall std::basic_ios<unsigned short,struct std::char_traits<unsigned short> >::fill(void)const " (?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ) en ExHostAppServices1.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: ya se definió "public: class std::basic_ostream<unsigned short,struct std::char_traits<unsigned short> > * __thiscall std::basic_ios<unsigned short,struct std::char_traits<unsigned short> >::tie(void)const " (?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ) en ExHostAppServices1.obj
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió "public: __thiscall exception::exception(char const * const &)" (??0exception@@QAE@ABQBD@Z) en LIBCMTD.lib(stdexcpt.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió "public: virtual __thiscall exception::~exception(void)" (??1exception@@UAE@XZ) en LIBCMTD.lib(stdexcpt.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió "public: __thiscall exception::exception(class exception const &)" (??0exception@@QAE@ABV0@@Z) en LIBCMTD.lib(stdexcpt.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió _malloc en LIBCMTD.lib(dbgheap.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió _realloc en LIBCMTD.lib(dbgheap.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió _free en LIBCMTD.lib(dbgheap.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió "public: __thiscall bad_cast::bad_cast(char const *)" (??0bad_cast@@QAE@PBD@Z) en LIBCMTD.lib(stdexcpt.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió _wcscmp en LIBCMTD.lib(wcscmp.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió __wcsicmp en LIBCMTD.lib(wcsicmp.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió _memmove en LIBCMTD.lib(memmove.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió _isdigit en LIBCMTD.lib(_ctype.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió "public: __thiscall exception::exception(void)" (??0exception@@QAE@XZ) en LIBCMTD.lib(stdexcpt.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió _atoi en LIBCMTD.lib(atox.obj)

[...]//Aqui otros cuantos erroes referentes a LIBCMTD.lib similares al anterior.

msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió __errno en LIBCMTD.lib(dosmap.obj)
msvcrtd.lib(ti_inst.obj) : error LNK2005: ya se definió "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) en LIBCMTD.lib(typinfo.obj)
msvcrtd.lib(ti_inst.obj) : error LNK2005: ya se definió "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) en LIBCMTD.lib(typinfo.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió __strnicmp en LIBCMTD.lib(strnicmp.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió _exit en LIBCMTD.lib(crt0dat.obj)
msvcrtd.lib(MSVCR71D.dll) : error LNK2005: ya se definió _fprintf en LIBCMTD.lib(fprintf.obj)
//Y luego da un monton de warnings (si os hacen falta os los mando tambien)

ExHostAppServices y CFrameEditor son clases del proyecto donde no uso para nada la dll.

Estan los dos(proyecto y dll) en "depuracion multiproceso".

Muchas gracias por adelantado.

Y si alguien sabe otra forma de escribir en un documento word que no requiera crear una libreria aparte se lo agradeceria mucho.
Volver arriba
      Índice del Foro elrincondelc.com -> Principiantes C/C++
Página 1 de 1Todas las horas están en GMT - 8 Horas

 
No puede crear mensajes
No puede responder temas
No puede editar sus mensajes
No puede borrar sus mensajes
No puede votar en encuestas

(c) ElRincondelC.com

Un proyecto de UrlanHeat.com