Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOS with Borland

Status
Not open for further replies.

potassium

Programmer
Dec 5, 2002
1
US
I'm trying to make a good old fashioned DOS application so I can send parameters to the application from the DOS command line. I just got the Borland C++ builder 6 but all the projects seem to build my apps into windows app for use with GUI components. Does anybody have experience with building just a simple DOS box applications with Borland?
 
Something to note, while you can build simple apps with Builder, you cannot build 16-bit apps. This means that even a simple "Hello, World" app will be 32-bit app. It will run on a Windows DOS prompt but it will not work on DOS ver. 6.22 or older.

When doing apps like this, I never use the IDE. While the IDE is perfect for Windows apps where you drag and drop components , for non-GUI apps a text editor is better.

Everybody has a favorite editor. I like Multi-Edit which integrates into Builder, Delphi, etc. very nicely. For simple apps, even Notepad will work.

Once you created the file and saved it as a *.cpp file, you need to compile it. If Builder is on you path, you can compile your app from the command line. Just type BCC32, space, your cpp filename, and RETURN.


James P. Cottingham

When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity.
[tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
 
You can create a *.cpp file, and then close all the files that the C++ builder opened, then double-click the "DOS" *.cpp file, then the C++ builder will load the *.cpp and applies a default project for you to complile and run the "DOS" *.cpp.
(Tested under C++ Builder 5) Coding is the worst thing I had done.
 
turbo C++ is free from the borland archive.
I use borland c++ 5.0 and borland c++ 3.0 for dos
apps.
 
what type of project are you selecting?

1) Windows applications!
2) Console!

console is the one that you want for dos programming.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top