Mail Archives: djgpp/2002/11/25/12:15:14
shayoom AT hotmail DOT com (Jonquil) wrote in news:63b211f7.0211250711.7d6a37a5
@posting.google.com:
> i understand that you no longer use rhide, so, if you cant answer me
> here i hope someone else will.. ;)
did setting targetname to the full path of the executable you want
created not help?
>> on the other hand, you can save yourself some time by learning a few
>> command lines:
>>
>> gcc -Wall -O2 hello.c -o hello.exe
>>
> i tried this line, and im glad you told me about it,,, i didnt really
> enjoy adding/deleting projects to run my programs, though i am sure
> that i will NEED them soon to run longer ones..
> anyway, i ran my hello.cpp program using projects and it worked well..
> i ran the same program using the command above, and i got some errors
> about using std::cout.. etc..
first, it is good practice to post the exact error messages you get: help
others help you.
for C++ source, you can use gpp to compile and link with the standard C++
libraries using the command line:
gpp -Wall -O2 hello.c -o hello.exe
or you can explicityly specify the libraries on the command line using
gcc.
by the way, make sure you use the standard C++ headers, rather than the
old-style headers. the latter will cause gcc to issue warnings:
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
}
--
A. Sinan Unur
asu1 AT c-o-r-n-e-l-l DOT edu
Remove dashes for address
Spam bait: mailto:uce AT ftc DOT gov
- Raw text -