March 24th, 2003, 09:56 PM
porting programs to other computers
i tried to put a game i wrote onto my brothers computer, but when he goes to run it, it errors and says it is missing a file, "MFC42D.DLL". now when i made the project, i selected to use MFC_SHARED_DLL'S in the project settings. this is how i was taught to make win32api progs. how do i set this up so that i can give this program to any windows user? i tried including that file in my prog and it gave me like 6000 errors.
March 24th, 2003, 11:57 PM
I'll take a shot: you need to buy the upgrade to the Professional Edition of VC++ 6.0. You're not allowed to distribute programs with lesser versions.
Last edited by 7stud; March 25th, 2003 at 12:05 AM.
March 25th, 2003, 12:44 AM
MFC42D.DLL is the debug dll version and comes along with Visual C++. If you compile your project for release, it'll use MFC42.DLL which should be present by default on the other computer. To do this, go to:
Build --> Set Configuration --> select "Win32 Release"
March 25th, 2003, 09:47 AM
when i build the way i normally do, i get no errors. when i try the Release way, i get this:
--------------------Configuration: TicMyTac - Win32 Release--------------------
nafxcw.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcw.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Release/TicMyTac.exe : fatal error LNK1120: 2 unresolved externals
March 25th, 2003, 09:52 AM
Also, when you distribute a Windows program that uses DLLs that might not be on the target system (eg, your MFC42.DLL), then you need to distribute the DLLs as well. That is why you install Windows apps with a setup program. If and when you get to the point of making your apps available to the world, you will need to create a setup for it. That is why InstallShield is included with VC++6. If you intend to distribute your apps, then you should start learning InstallShield as well.
In the meantime with family and friends, you can kludge your way around like we sometimes need to do with our lab computers: see which DLLs the app complains on a new system and then copy that file from your system to the target. You should find most of them in the C:\Windows\System directory, or use the Find utility to locate them. A bit tedious, but that first one should provide you a list of which ones are needed which will help on the next one. Plus, installation of your next app should go a lot smoother on that target.
March 25th, 2003, 10:12 AM
-yup, that is what i did. i stuck em all in an archive. i will have to try out using that Install Shield.. tho with my luck that in itself will probably require a manual of its own!!
edit: whereabouts do find that install shield? i cant seem to find it anywhere, i have the Enterprise edition of VS6 & VS.net btw.
Last edited by infamous41md; March 25th, 2003 at 10:15 AM.
March 25th, 2003, 01:48 PM
I forget which VC++6 I have -- Professional, maybe. Installing InstallShield was part of the installation. An icon for it appears in the Start Programs menu: "InstallShield for Microsoft Visual C++ 6".