VC++6.0 Release Build Problem
I'm running VC++6.0 on WindowsXP SP2.
The project I'm working on is based on MFC.
Whether it has been built release or debug it runs OK on my PC.
But when it comes with General PC with WindowsXP (not installed any DEV tools)
it gives me an error and shut off.
At First, I discovered that AfxLoadLibrary(dllPath) was returning NULL, though
the dll was on the exact path. (please remind that the program works fine on my
PC)
With ::GetLastError it gave me ERROR_MOD_NOT_FOUND. (Could it be possible?!)
Later, I've found some warnings while release-building the dll.
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
So I checked run-time library, but noting was wrong. It was not debug mode and
relevant projects were running on same run-time library "MultiThreaded DLL". (It was /MD not /MDd)
Finally I've checked linked library files if it could be debug-built.
They are
ZipArchive.lib vfw32.lib cximagecrt.lib
At the very moment, I don't know what to do.
Have you got any ideas with my problem?
mfc42d.lib sounds like the debug version of an mfc library, not release.
also, vc6 was obsolete years ago.
also, vc6 was obsolete years ago.
The discrepancy of the DLLs might not be the root issue problem but it has to be fixed and it could be the root issue.
Everything you use for an app ought to be built with the same CRT settings regarding Single vs Multi-threaded, Static vs DLL, & Release vs Debug.
If you mix up any of those settings and share a pointer between code you will frag the heap and/or free-store.
Find the release configurations that are using the mfc42D.lib etc... versions - that D means debug is why it won't load on a PC without the toolchain installed.
If you suspect it is one of the .lib's, remove them and perform a full rebuild to see if you get the linker warnings again (it will fail to link but if the CRT conflict warning also disappears that's it).
Everything you use for an app ought to be built with the same CRT settings regarding Single vs Multi-threaded, Static vs DLL, & Release vs Debug.
If you mix up any of those settings and share a pointer between code you will frag the heap and/or free-store.
Find the release configurations that are using the mfc42D.lib etc... versions - that D means debug is why it won't load on a PC without the toolchain installed.
If you suspect it is one of the .lib's, remove them and perform a full rebuild to see if you get the linker warnings again (it will fail to link but if the CRT conflict warning also disappears that's it).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement