Solved

Can't Get Simple Program to Run

Posted on 1998-01-07
7
191 Views
Last Modified: 2010-04-10
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
Comment
Question by:Jose_G
7 Comments
 
LVL 22

Expert Comment

by:nietod
Comment Utility
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
 
LVL 4

Expert Comment

by:marko020397
Comment Utility
You should set in application properties that this is
a console application. It should not be a GUI application.
0
 
LVL 22

Expert Comment

by:nietod
Comment Utility
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:Jose_G
Comment Utility
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
 
LVL 22

Expert Comment

by:nietod
Comment Utility
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
 
LVL 22

Expert Comment

by:nietod
Comment Utility
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
 
LVL 32

Accepted Solution

by:
jhance earned 20 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now