Results 1 to 11 of 11

Thread: A simple question (I hope)

  1. #1

    Thread Starter
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340

    Question

    Could someone please tell me how i can compile a C++ file so that it will run in DOS instead of 32 bit windows? I have VC++ 6, and borland C++ builder 5, and i can't find a way with any of them. I don't understand, i tried compiling from the command prompt with borland. the program i am using to compile is bcc32, so obviously 32 bit, but i can't find any application like just BCC to compile it with!

    I am getting frustrated. I thought that by learning c++ i would be able to make programs for operating systems other than windows!

    If anyone could enlighten me as to how to compile for dos it would be appreciated. I hope it is just some stupid thing that i can't figure out, because if it is not then i wasted a lot of money. Because i didn't want to be making many programs for windows.

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    I don't know, I never really thought about it. There are free compilers out there (djgpp or something like that is one I think) and I expect a lot of them only work in DOS, you could try one of them.
    Harry.

    "From one thing, know ten thousand things."

  3. #3

    Thread Starter
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340

    Yeah

    Well, i don't really want one of those dos ones, i have djgpp, but i thought that a superior product like borland of vc++ would be able to acomplish a task like this.

  4. #4
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    True, true.
    Harry.

    "From one thing, know ten thousand things."

  5. #5
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    I think it could be because it's a 32-bit compiler. DOS programs would have to be 16-bit I think.
    Harry.

    "From one thing, know ten thousand things."

  6. #6

    Thread Starter
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    So i am guessing that everyone in here must be a windows c++ developer? Oh well, i guess i will just go with djgpp for a little while, although i think that seems like borland or microsoft would somehow be able to compile programs for dos.

  7. #7
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    You might have to get hold of a 32-bit DOS extender like Dos4gw or something like that to get 32-bit apps running in DOS. Not Win32 apps, I mean just plain 32-bit programs. *Shrug* I've never tried it.

    Harry.

    "From one thing, know ten thousand things."

  8. #8

    Thread Starter
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    ok, i'll just fiddle around with it for a while

  9. #9
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    The same C++ code will compile on DOS, Windows, Unix, RISC OS, whatever.

    However, you need to keep in mind that out of those, DOS is 16-bit, so there are some caveats which are too complex to go over in detail, but are easy to fix when encountered.

    It all depends on the compiler.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  10. #10

    Thread Starter
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    well like say that i was to write my own OS, (If i could) and i had some ASM code start up the computer, and then i had some c++ prorams. If the OS was 32 bit, could i run those programs in that os, if they were compiled in 32 bit by vc++?

    understand what i am saying?

  11. #11
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    No. You'd need a c++ compiler for your OS. Visual C++ only creates Windows executables.

    Although with an extra tool you can create V2 programs.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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