Executing in DOS...

This is a discussion on Executing in DOS... within the C Programming forums, part of the General Programming Boards category; I am using the DigitalMars Compiler and when I compile a program it will only execute in windows... even if ...

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    59

    Executing in DOS...

    I am using the DigitalMars Compiler and when I compile a program it will only execute in windows... even if it is a command prompt only program... it sais "Requires Win32" when I execute it when Windows isn't running do I need a new compiler or would I just use a special parameter?

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    375
    I don't know enough about that compiler to know if it can do DOS programs or not, but usually you gotta go with a 16-bit compiler for that. The only other alternative I know of is DJGPP which is a 32-bit pure DOS compiler.
    Allegro precompiled Installer for Dev-C++, MSVC, and Borland: http://galileo.spaceports.com/~springs/

  3. #3
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    In order to be able to compile for DOS you need to use the DOS libraries. Those can also be downloaded from the site where the compiler can be downloaded from:

    http://www.digitalmars.com/

  4. #4
    Registered User
    Join Date
    Mar 2002
    Posts
    59

    Parameter...

    I downloaded the dos16 libraries and I put them in their correct folders (bin and lib) but I can't figure out what parameter to use, how would I type it into the command line to specify that I wanted to compile it for DOS only?

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Didn't the libraries come with readme files? readme files tend to contain useful information like that.

    -Prelude
    My best code is written with the delete key.

  6. #6
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    Placing the libraries in the correct places is one thing. Now you need to tell your linker that you will be using these libraries. There are some possibilities to do this. First you could mention the libraries in your makefile, so the make utility knows that these libraries are required for building. Or you could pass the libraries as argument to your linker.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Executing DOS commands from inside an image
    By Moony in forum C Programming
    Replies: 6
    Last Post: 03-16-2008, 12:40 PM
  2. Executing DOS command in C
    By m.sudhakar in forum C Programming
    Replies: 3
    Last Post: 07-22-2006, 02:52 PM
  3. File systems?? (Winxp -> DOS)
    By Shadow in forum Tech Board
    Replies: 4
    Last Post: 01-06-2003, 08:08 PM
  4. dos closes right away after executing
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 01-18-2002, 02:59 AM
  5. DOS program versus DOS console program
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-10-2002, 12:42 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21