-
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.
-
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.
-
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.
-
-
I think it could be because it's a 32-bit compiler. DOS programs would have to be 16-bit I think.
-
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.
-
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.
-
ok, i'll just fiddle around with it for a while
-
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.
-
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?
-
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.