Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking a VC++ 6.0 DLL into a Visual Studio 2005 app

Status
Not open for further replies.

can41

Programmer
Nov 18, 2007
2
US
Hi Folks-
I'm a newbie with Visual Studio 2005 and am trying to link a vendor's Visual Studio 6.0 .dll into our new executable.
I'm getting linking errors and not sure where to turn.

Do you have any advice for me?
Does the vendor need to port the 6.0 dll into a 2005 dll?

Thank you for your time!
 
What sort of errors?

Did you set the various library search paths so the linker knows where to look for your 3rd party libraries?


--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
Hi Salem! Thanks!
The errors are many but they look something like this:
(MXE.lib is the old VC++ 6.0 lib I'm trying to link)

LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual __thiscall std::bad_cast::~bad_cast(void)" (??1bad_cast@std@@UAE@XZ) already defined in MXE.lib(log.obj)

MXE.lib(DTDred.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@std@@YAXXZ)

MXE.lib(InterXferSyncClass.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ)

MXE.lib(generator.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::ios_base::Init::Init(void)" (??0Init@ios_base@std@@QAE@XZ)

MXE.lib(rootClass.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::ios_base::Init::Init(void)" (??0Init@ios_base@std@@QAE@XZ)
 
Yeah, that looks a lot like the vendor needs to supply a new DLL. It's certainly worth giving them this information.

Things like [tt]std::ios_base::Init::Init[/tt] would obviously be defined by the standard libraries supplied with the compiler, but they've either been removed or changed the interface and now the linker can no longer resolve them.



--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
Under code generation, what type of run-time library are you using? It can be any of the following

Single threaded
Multithreaded
Multithreaded DLL
Debug Single Threaded
Debug Multithreaded
Debug Multithreaded DLL

LIBCMTD is Debug Multithreaded but how has the VC6 library been compiled? If you get a clash, the run-time library is not compatible. You should use the same run-time library as the library.

Try Multithreaded DLL or one of the others and see how far you get.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top