Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 225
  • Last Modified:

Can't Get Simple Program to Run

This is the program:
#include <iostream.h>
void main()
   {
   cout << "Every age has a language of its own";
   }
Can't get any simpler than that, yet I can't get Borland C++ 5.01 to make it into a working executable file (it makes an .exe file out of it, but when I try to run it says "Not a valid Win32 Application").  How can I make this program into a valid executable with BC5's project options (using Text Edit is not an option)?
0
Jose_G
Asked:
Jose_G
1 Solution
 
nietodCommented:
I'm not familiar with Borland C, but the basic problem is that it is trying to create a windows program and you want it to create a console (MS DOS) program.  Look for some project settings that indicate the type of executable to be produced.  (You might have to create a new projact as these settings might not be alterable after a project has been created.
0
 
marko020397Commented:
You should set in application properties that this is
a console application. It should not be a GUI application.
0
 
nietodCommented:
That's exactly what I said.  Unless he knows how to do so, or you can tell hime how to do, that is not much help.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Jose_GAuthor Commented:
I think I should have re-worded my question.  For a program such as that (extremely simplistic), what are the project settings I should use so that when I have BC5 run the program it makes a valid executable?
0
 
nietodCommented:
I don't know, because I use Visual C.  However, if no one else can help, look for settings about a "console" application or a "DOS" application.  Not a "Windows" or "GUI" application.
0
 
nietodCommented:
For what its worth.  In vissual C, you can't change these settings for an existing project.  You must specify them when the project is created.  If Borland is the same, you need to create a new project from scratch.
0
 
jhanceCommented:
From the MSDOS command line, the following will build, and link a BCC MSDOS command line application:

C:\FILES>BCC -IC:\BC5\INCLUDE -LC:\BC5\LIB yourfile.cpp

Note that the C:\BC5\INCLUDE and C:\BC5\LIB are installation dependent and may be different on your system.  The -I specifies where the include files are to be found.  The -L specifies where the linker should find the runtime library files.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now