Nico Heinze <[EMAIL PROTECTED]> wrote: --- In
[email protected], chetan verma <[EMAIL PROTECTED]>
wrote:
<snip>
> where do i give -o2 option
> isn't -o option for giving the output file name
>
> -chetan
Chetan,
you're right, the -o option names the output file.
However, the -o2 option does NOT name the output file to be "2" but
sets the optimisation level to 2.
This is a very unfortunate but still vivid example of command-line
options not conforming to any standards. Very confusing indeed. It
took me quite some time to understand this hysteric... eh, historic
nonsense.
Regards,
Nico
Recent Activity
86
New Members
1
New Files
Visit Your Group
SPONSORED LINKS
Computer programming languages
Java programming language
Basic programming language
Programming languages
C programming language
Y! Messenger
All together now
Host a free online
conference on IM.
Ads on Yahoo!
Learn more now.
Reach customers
searching for you.
Yahoo! Groups
Start a group
in 3 easy steps.
Connect with others.
._,_._,___
Hi Nico,
I tried the -o2 option, but no change in the size of final exe.
I tried on cygwin ang mingw compilers.
Following are the output:
[EMAIL PROTECTED] /cygdrive/h/cpp
$ cat hw.cpp
#include <iostream>
int main()
{
std::cout<<"Hello World!"<<std::endl;
return 0;
}
[EMAIL PROTECTED] /cygdrive/h/cpp
$ g++ hw.cpp
[EMAIL PROTECTED] /cygdrive/h/cpp
$ ls -l a.exe
-rwxr-xr-x 1 cv None 477718 Jan 31 23:39 a.exe
[EMAIL PROTECTED] /cygdrive/h/cpp
$ g++ -o2 hw.cpp
[EMAIL PROTECTED] /cygdrive/h/cpp
$ ls -l a.exe
-rwxr-xr-x 1 cv None 477718 Jan 31 23:39 a.exe
[EMAIL PROTECTED] /cygdrive/h/cpp
$
On mingw:
H:\cpp>g++ hw.cpp
H:\cpp>dir a.exe
Directory of H:\cpp
01/31/2007 11:41 PM 474,990 a.exe
1 File(s) 474,990 bytes
0 Dir(s) 1,446,207,488 bytes free
H:\cpp>g++ -o2 hw.cpp
H:\cpp>dir a.exe
Directory of H:\cpp
01/31/2007 11:41 PM 474,990 a.exe
1 File(s) 474,990 bytes
0 Dir(s) 1,446,211,584 bytes free
H:\cpp>
-chetan
-chetan verma
final year B-Tech(CSE)
Indian School of Mines
Dhanbad
India
[EMAIL PROTECTED]
[EMAIL PROTECTED]
+919835108609
---------------------------------
Need a quick answer? Get one in minutes from people who know. Ask your question
on Yahoo! Answers.