Sign in to follow this  
opticaller

VC++6.0 Release Build Problem

Recommended Posts

opticaller    122
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?

Share this post


Link to post
Share on other sites
Shannon Barber    1681
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).

Share this post


Link to post
Share on other sites
opticaller    122
Absolutely!

I've removed ZipArchive.lib from additional object/library modules and the warnings disappeared.

Maybe I could tell if the program works fine after building it with release ver. of ZipArchive.lib.

Thanks!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this