views:

59

answers:

1

I'm developing application using VC++ 6.

I have a 3rd party DLL. This library compiled as Multithreaded DLL (/MD) and my application too. But I fail to link:

LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "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_strin
g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in XXXApi.lib(CODbg.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "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> >(class std::basic_string<c
har,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in XXXApi.lib(Dictionary.obj)
../../Exes/win2k3_oracle11/XXX.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.

From here I see that even though both 3rd library and my code compiled as /MD, there's possibly conflict with old/new iostream beining used.

Is there way to determinate what iostream library old/new is used by 3rd party library?

UPD: The 3rd party lib is static and not dynamic as I thought before. The lib is compiled /MD. Dependency Walker works wirh DLLs and not which Libs.

+2  A: 

There is dependency Walker, if you don't know this tool. http://dependencywalker.com/

Drag and drop your DLL or exe on the main window. It will show all dependencies.

And if you want to link to a 3rd party DLL, all you need is a .lib made for that DLL. If you don't have that .lib, you can always make one using lib.exe or polib.exe from pelles c tools. polib is easier to use because you don't need to write a .def file. http://www.smorgasbordet.com/pellesc/

I hope it helps for your question.

Edit: Do you have the source code for the .lib you are using?

toto