CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Posts
    2

    Q: How do I create a VC6 project that will run in Win95 DOS mode?

    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-


  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Q: How do I create a VC6 project that will run in Win95 DOS mode?

    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



  3. #3
    Join Date
    May 1999
    Posts
    1

    Re: Q: How do I create a VC6 project that will run in Win95 DOS mode?

    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



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured