problem with moving project from vc++6 to vc++2005 express

hello all,

i am porting rather large dll projects from vc++6 to vc++2005 express and having several problems.
i am using somel dll's whitch i built new myself with vc++2005. but also i want to use some libs  that are old and compiled with vc++6. is that even possible, or any kind of workaround to my problem

i know that there have been some changes concerning the iostream implementation, i am not sure thou if this does affect me or not. any comments appreciated.

i checked my project settings and i compiled everything with /MDd (or /MD).
my app. my dlls.

i checked the symbols with dumpbin for msvcprtd.lib witch has that particular symbol that is causing my first LNK2005 error.
the old msvcprtd.lib (in my vc98 directory) does not have that symbols, mabey thats why it compiles with vc++6

anyway thank you very much

the errors i am getting are:
msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: char * __thiscall 
std::strstreambuf::str(void)" ( str@strstreambuf@std@@QAEPADXZ) already
defined in dbt_d.lib(decport.obj)
msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: __thiscall
std::strstreambuf::strstreambuf(char const *,int)"
( 0strstreambuf@std@@QAE@PBDH@Z) already defined in dbt_d.lib(decport.obj)

Finished searching libraries
dbt_d.lib(decport.obj) : warning LNK4217: locally defined symbol
1istrstream@std@@UAE@XZ (public: virtual __thiscall
std::istrstream::~istrstream(void)) imported in function "public: void __thiscall
std::istrstream::`vbase destructor'(void)" ( _Distrstream@std@@QAEXXZ)
dbt_d.lib(decport.obj) : warning LNK4217: locally defined symbol
0ostrstream@std@@QAE@PADHH@Z (public: __thiscall
std::ostrstream::ostrstream(char *,int,int)) imported in function "class RWCString __cdecl
unsignedLongToString(unsigned long)"
( unsignedLongToString@@YA AVRWCString@@K@Z)
dbt_d.lib(decport.obj) : warning LNK4217: locally defined symbol
1ostrstream@std@@UAE@XZ (public: virtual __thiscall
std::ostrstream::~ostrstream(void)) imported in function "public: void __thiscall
std::ostrstream::`vbase destructor'(void)" ( _Dostrstream@std@@QAEXXZ)
dbiflib_9.21_d.obj : error LNK2019: unresolved external symbol
_newInfDbLibDatabaseImp referenced in function "public: __thiscall
RWDBInformixEsqlObj::RWDBInformixEsqlObj(void)" ( 0RWDBInformixEsqlObj@@QAE@XZ)
hblib_d.lib(mutex.obj) : error LNK2019: unresolved external symbol
"__declspec(dllimport) long __stdcall InterlockedIncrement(long *)"
(__imp_ InterlockedIncrement@@YGJPAJ@Z) referenced in function "public: int
__thiscall ost::AtomicCounter::operator+=(int)"
( YAtomicCounter@ost@@QAEHH@Z)
hblib_d.lib(mutex.obj) : error LNK2019: unresolved external symbol
"__declspec(dllimport) long __stdcall InterlockedDecrement(long *)"
(__imp_ InterlockedDecrement@@YGJPAJ@Z) referenced in function "public: int
__thiscall ost::AtomicCounter::operator-=(int)"
( ZAtomicCounter@ost@@QAEHH@Z)
dbt_d.lib(decport.obj) : error LNK2001: unresolved external symbol
"protected: virtual class std::fpos<int> __thiscall
std::strstreambuf::seekoff(long,enum std::ios_base::seekdir,int)"
( seekoff@strstreambuf@std@@MAE AV $fpos@H@2@JW4seekdir@ios_base@2@H@Z)
dbt_d.lib(dbmutex.obj) : error LNK2019: unresolved external symbol
"__declspec(dllimport) class std::basic_ostream<char,struct
std::char_traits<char> > & __cdecl std::operator<<(class
std::basic_ostream<char,struct std::char_traits<char> > &,char const *)"
(__imp_ 6std@@YAAAV $basic_ostream@DU $char_traits@D@std@@@0@AAV10@PBD@Z) referenced in function
"void __cdecl indent__(void)" ( indent__@@YAXXZ)
dbt_d.lib(tracer.obj) : error LNK2001: unresolved external symbol
"__declspec(dllimport) class std::basic_ostream<char,struct
std::char_traits<char> > & __cdecl std::operator<<(class std::basic_ostream<char,struct
std::char_traits<char> > &,char const *)"
(__imp_ 6std@@YAAAV $basic_ostream@DU $char_traits@D@std@@@0@AAV10@PBD@Z)
tls_d.lib(cstrngio.obj) : error LNK2001: unresolved external symbol
"__declspec(dllimport) class std::basic_ostream<char,struct
std::char_traits<char> > & __cdecl std::operator<<(class
std::basic_ostream<char,struct std::char_traits<char> > &,char const *)"
(__imp_ 6std@@YAAAV $basic_ostream@DU $char_traits@D@std@@@0@AAV10@PBD@Z)
dbt_d.lib(tracer.obj) : error LNK2019: unresolved external symbol
"__declspec(dllimport) class std::basic_ostream<char,struct
std::char_traits<char> > & __cdecl std::operator<<(class std::basic_ostream<char,struct
std::char_traits<char> > &,char)"
(__imp_ 6std@@YAAAV $basic_ostream@DU $char_traits@D@std@@@0@AAV10@D@Z) referenced in function "public:
class RWDBTracer & __thiscall RWDBTracer::operator<<(char)"
( 6RWDBTracer@@QAEAAV0@D@Z)
Z:\linkVobW\vmis\src\Debug\ddptestCORBA.exe : fatal error LNK1120: 6
unresolved externals
Build log was



Answer this question

problem with moving project from vc++6 to vc++2005 express

  • JoeFou

    VS 2005 Express editions does not have MFC. It supports only Windows Forms. If you are using MFC you need to use full version of VC8, express wont help.
  • scorpio

    thank you for answering so quickly.
    i guess i'll have to get new versions of those libs.
    but i still would like to understand this error.
    i'd like to know if the changes made to the iostream lib in vs2003 are responsible for that.
    do you know any scources of information concerning this matter
    more than what i can find on "Differences in iostream Implementation"
    http://msdn2.microsoft.com/en-us/library/8h8eh904.aspx#_core_differences_in_iostream_implementationanchor

    thank you very much.



  • haroonsarwar84

    Linking against libs built with older versions is not a supported scenario. Also, in general mixing CRT model sometimes work but not officially supported.

    Try rebuilding the old libs or contacting the owner of thr old lib to get a new version.

    Of course you can try some workarounds like the linker switch /nodefaultlib but it might not work in the future.

    Thanks,
    Ayman Shoukry
    VC++ Team


  • problem with moving project from vc++6 to vc++2005 express