GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 10-Mar-2004, 13:58
killer9012 killer9012 is offline
Member
 
Join Date: Mar 2004
Posts: 137
killer9012 is an unknown quantity at this point
Unhappy

problem with borland compiler


ok, im new to this so please dont laugh.

This is what I get after using the hello world cpp

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Adam>bcc32.exe -c c:\borland\hello.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
c:\borland\hello.cpp:
Error E2209 c:\borland\hello.cpp 1: Unable to open include file 'iostream.h'
Error E2451 c:\borland\hello.cpp 5: Undefined symbol 'cout' in function main()
*** 2 errors in Compile ***


my cpp file is:

#include <iostream.h>

int main ()
{
cout << "Hello World!\n";
return 0;
}

Can anyone help me out please?? Thanks!
  #2  
Old 10-Mar-2004, 14:08
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 4,791
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold
Probably the easiest way is to put two configuration files in the directory where bcc32.exe lives:

bcc32.cfg
ilink32.cfg

For my installation, bcc32.exe is in directory C:\Borland\BCC55\Bin (the default installation directory, as I recall).


The contents my bcc32.cfg are
CPP / C++ / C Code:
-I"C:\Borland\BCC55\include"
-L"C:\Borland\BCC55\lib"

The contents of my ilink32.cfg are
CPP / C++ / C Code:
-L"C:\Borland\BCC55\lib"

If your installation directory is different, make changes in the paths shown.

I hope this helps,

Dave
  #3  
Old 10-Mar-2004, 14:27
killer9012 killer9012 is offline
Member
 
Join Date: Mar 2004
Posts: 137
killer9012 is an unknown quantity at this point
ok. It works now. Now it made a .obj file. How do I turn it into an exe?
  #4  
Old 10-Mar-2004, 14:41
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 4,791
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold
How are you compiling the file?

In my case, the bcc32.exe in on my PATH environment variable.

Then I open a console window, navigate to where the source file resides.

Suppose the source file is named "hello.cpp"

I type the following on the command line:

bcc32 hello.cpp

The result is that the following files are added to the same directory:

hello.obj
hello.exe

(There is another file, hello.tds, which you don't need to worry about just now.)

So --- just enter the following on the command line:

hello


And see your message!




Dave
  #5  
Old 10-Mar-2004, 14:58
killer9012 killer9012 is offline
Member
 
Join Date: Mar 2004
Posts: 137
killer9012 is an unknown quantity at this point
so this exaple was a dos only example? It doesnt run in windows, I have to run it trough msdos.
  #6  
Old 10-Mar-2004, 15:34
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Quote:
Originally Posted by killer9012
so this exaple was a dos only example? It doesnt run in windows, I have to run it trough msdos.

It runs on windows, its output is just directed to a console windows. If you run it by clicking on the icon, it will execute and exit before you see it running. To make it pause at the end, modify your program to wait for a key press something like:

CPP / C++ / C Code:
#include <iostream.h>

int main ()
{
char keypress;             //Define a variable of type char to hold the keypress
cout << "Hello World!\n";

cout <<"Press enter to continue";
cin >> keypress;          //Wait for a keypress
return 0;
}

It doubles the size of your program but should wait now even if you click on the icon.

HTH
  #7  
Old 11-Mar-2004, 13:40
killer9012 killer9012 is offline
Member
 
Join Date: Mar 2004
Posts: 137
killer9012 is an unknown quantity at this point
Just wondering Im learning from sams teach your self. Lets say i get the knack of it, can this program creat a window like programs like winamp, or what not, or do I need another program to creat things such as that?
  #8  
Old 11-Mar-2004, 16:04
killer9012 killer9012 is offline
Member
 
Join Date: Mar 2004
Posts: 137
killer9012 is an unknown quantity at this point
in c++ coding, is their a way to input an audio command, and or send an audio responce.

Example, im trying to make a program to activate programs by voice. Also, if an erro occures in the process, I would like it to say the error verably, using pre created mp2/wav files with the errors written in them. Any help or a link to somewhere that can help is appreatiated.
  #9  
Old 11-Mar-2004, 20:57
aaroncohn's Avatar
aaroncohn aaroncohn is offline
Regular Member
 
Join Date: Feb 2004
Location: Bay Area, CA.
Posts: 564
aaroncohn is a jewel in the roughaaroncohn is a jewel in the roughaaroncohn is a jewel in the rough
Have you looked anywhere for a library? I'm sure someone has probably designed a library with classes to make this a lot less painful.
__________________
-Aaron
  #10  
Old 11-Mar-2004, 21:33
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Quote:
Originally Posted by killer9012
Just wondering Im learning from sams teach your self. Lets say i get the knack of it, can this program creat a window like programs like winamp, or what not, or do I need another program to creat things such as that?

I am not 100% sure what is included in the borland compiler you have but there is probably some kind of dialog editor or gui editor. There are also many free gui toolkits that you can use.

This is my own opinion, but GUI programming can be pretty involved. Here is a link to a tutorial that I wrote about a gui toolkit. This is the simplest of toolkits to understand (IMHO) and it can become pretty complex.

C (or C++) is the best language for me. But it may not necesarily be the best for what your application is. You can probably find alot of sound libraries for many languages to handle sound programming.

Once again this would be pretty involved and no matter what Sams says, you can't teach yourself C in 24 hours. My advice is to pick a programming language (hopefully C ) and learn it starting from the basics up before you get too caught up in this other stuff.
 
 

Recent GIDBlogWriting a book by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Yet another GeForce 5600 ultra problem!!! light875 Computer Hardware Forum 1 05-Mar-2004 03:51
problem with php5 cgi installation fab13 Apache Web Server Forum 3 19-Nov-2003 10:11
unwanted scrollbar problem kelly001 Web Design Forum 3 24-Oct-2003 11:44
folder problem in trees zuzupus MySQL / PHP Forum 23 26-Sep-2003 08:32
PHP/CSS/Netscape/IE problem... :-D mateo1221 Web Design Forum 1 24-Sep-2003 17:55

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 00:59.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.