Click to See Complete Forum and Search --> : Q: How do I create a VC6 project that will run in Win95 DOS mode?


Jim
May 12th, 1999, 12:44 PM
I have a program that I would like to be able to build so that it can be copied to a DOS bootable disk and then run off that disk.
I tried creating a Win32 console app, then removing the Win32 libraries from the link tab...didn't work.
I tried checking the "ignore all default libraries" checkbox on the project settings->link tab... wouldn't link because of unresolved
externals such as fclose, fprintf...

Any ideas would be appreciated.
thanks,
-jim-

Paul McKenzie
May 12th, 1999, 01:19 PM
I'm not too familiar with what needs to be distributed with a console app, so I may be barking up the wrong tree:

You need to link the standard C runtime library. I think that's MSVCRT.LIB. However, I believe that this is an import library and not a static library. If this is the case, you wil either have to include the MSVCRT.DLL along with the app, or you will have to build a static run-time library (only if one doesn't already exist and MS is not telling us which file it is).

The IDE doesn't seem to have an option to use a static version of the runtime library. This leads me into believing that Microsoft wants you to only use the DLL version of the runtime. If there is an option to do so, it definitely isn't obvious.

Also, I would start from square one and not remove any libraries. Once you've got an app built, then you can start removing libraries until something breaks down.

Regards,

Paul McKenzie

keithb
May 13th, 1999, 07:32 PM
On the C/C++ tab, choose Code Generation in the Category combo box. One of the options that gets displayed is "Use run-time library:." This is the option you want to change. There are six options: Single-Threaded, Multithreaded, Multithreaded DLL, and debug versions of the above three. By selecting an option without "DLL" in the name, you'll link to a static library.

fopen and fclose are implemented in MSVCRT, so they'll get sucked in properly.

-keithb