guys, i have been working on a project, i have been trying to use dxsmithlib (a directx wrapper from codeproject) and win32 CONSOLE application in visual c++ 6. When i try to build the project by specifying "use MFC in a shared DLL"
it shows no errors or warnings and works fine. But in case of "use MFC in a static library" i get the following errors:
Linking... msvcrtd.lib(MSVCRTD.dll) : error LNK2005: _sprintf already defined in libcmtd.lib(sprintf.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: _atol already defined in libcmtd.lib(atox.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: _strncpy already defined in libcmtd.lib(strncpy.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: _fclose already defined in libcmtd.lib(fclose.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: __vsnprintf already defined in libcmtd.lib(vsnprint.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: __strcmpi already defined in libcmtd.lib(stricmp.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: __stricmp already defined in libcmtd.lib(stricmp.obj)
LINK : warning LNK4098: defaultlib "mfc42d.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "mfcs42d.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/Asteroid.exe : fatal error LNK1169: one or more multiply defined symbols found Error executing link.exe.
can anyone help me remedy the problem?
The file runs okay on win 98 SE -- the platform i have been using to develop the project. But gives the following error on winXP:
"cannot find mfc42d.dll". Actually i was suggested by someone to use MFC in a static library in the project settings so that it also runs on XP...
And also another problem is that if i execute it from visual C++ the program runs smoothly but when i run the exe file outside VC++(the way user will use it) the program doesnt run smoothly-it somewhat stucks at every key i press on my keyboard. i need some help here guys... :-|