hi
yes it passed both the tests.
cheers
nikhil.
Main Topics
Browse All Topicshi
I am working on a samll project of mine.
all i want to do is that i want to create an exe file of the project.
I have C++ builder 6 . i think the compiler is missing for the making of exe file.
any ideas how i can make and exe file in C++ builder 6?
Cheers
Nikhil.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Great!
C++ Builder is OK.
Now you need decide which executable program you want create.
There are 3 options:
1. C Console application
2. C++ Console application
3. Windows VCL (Visual Component Library) application
Let's define the three types:
1. C Console
Your program will run in full screen or in a black background window, typically in text mode only. The syntax is ANSI C or Borland C (some addins from Borland). Here is a sample:
// c code sample
//------------------------
#include <conio.h> // for using getch()
void main(void)
{
int i;
for (i=1; i<=3; i++)
{
printf("%d\n");
}
getch(); // console will be closed immediately without this
//------------------------
The console will show:
1
2
3
as a result of the above program.
2. 1. C++ Console
Your program will run in full screen or in a black background window, typically in text mode only, the same as in C Console. The difference is the program is in C++ syntax. Here is a sample:
//------------------------
#pragma hdrstop
#pragma argsused
#include <math.h> // for using tan
#include <iostream.h> // for using cin and cout
void main(void)
{
class CPolygon // dfefine regular polygon
{
private:
float area;
public:
char *name;
int n; // number of vertices
float side; // side lenght
float PolyArea()
{
area = side*side*n/(4*tan(3.14159
return area;
}
};
char c;
CPolygon triangle; // create triangle class
triangle.name="Triangle";
triangle.n = 3;
triangle.side = 15;
cout << "Area of " << triangle.name << " is " << triangle.PolyArea();
cin >> c; // waits for the user to close console
}
//------------------------
This code results in the following message in the console:
Area of Triangle is 97.4281
3. C++ VCL application
Your program will run in a window and can use all the Windows components (windows, dialogs, buttons, graphics, images). The code to call VCL functions must be in C++ syntax, but parts can be pure C. Here is a sample (just a fragment, to give an idea):
//------------------------
void __fastcall TForm1::FormCreate(TObject
{
pathcourses = "K:\\Borland\\CBuilder6\\P
filecourses = "courselist.vts";
F1Chapter->Visible = false;
Form1->Width = 313;
icourse = 0;
Load1Click(this);
changed = true;
}
//------------------------
You can start with simple C or C++ programs, as console applications.
Also you can try the 2 sample codes provided here to build exe files.
Well, we checked that C++ Builder is running properly and, for sure, is creating exe files.
If you use the default directories, the exe file will be made in the same directory the source files are. Let me suggest to create a new directory for each new project, so you can examine easely the files.
Jose
Business Accounts
Answer for Membership
by: JoseParrotPosted on 2006-09-16 at 18:24:59ID: 17536875
Hi Nikhil,
Lets test the C++ Builder installatioin.
We will create a really simple Windows program to check if C++ Builder works properly.
Please follow these steps:
1. In the menu bar (File Edit Search View, etc.), click in File
2. A menu opens, then chose New
3. Another menu opens, chose Application
4. Builder creates a Form (an empty window)
5. Press key F9
6. Builder starts compiling the program (yes, it is very simple, but it is a program)
7. After compiling and linking, an empty window appears. Title is Form1.
8. Close this window.
If all steps were as described, then C++ Builder is installed properly.
Then, we can check for a console program.
1. In the menu bar (File Edit Search View, etc.), click in File
2. A menu opens, then chose New
3. Another menu opens, chose Other
4. A dialog box opens. Chose Console Wizard
5. In the Console Wizard check "C++" and "Console application".
All the othes options must be unchecked.
6. In the Console Wizard press OK
7. Builder asks for save the file, chose No
8. Builder opens the editor window with the following program:
int main(int argc, char* argv[])
{
return 0;
}
9. Press key F9 to complie
10. Builder starts compiling the program (yes, it is another very simple program)
11. After compiling and linking, an empty DOS like windows opens (it is the console window)
12. Quickly the console disappears.
If this happens as described, then C++ Builder is OK and properky installed.
You have successfuly created a Windows application and a Console application.
Please tell us if Builder have passed both tests.
Regards,
Jose