This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Optimizing code with cygwin gcc??
- To: cygwin@sourceware.cygnus.com, "Raman Bakshi" <raman_bakshi@yahoo.com>
- Subject: Re: Optimizing code with cygwin gcc??
- From: "Dan Oelke" <Dan.Oelke@oelke.com>
- Date: Thu, 29 Jul 1999 14:13:41 -0500
- References: <19990729184831.7113.rocketmail@web122.yahoomail.com>
[...]when i compile and link my code using
>the -O1 or -O2 options i get get tons of error
>messages during linking time ( gcc -o -O2 exe_name
>obj1.o obj2.o). [...]
To get rid of your error messages what you need to do is:
gcc -o exe_name -O2 obj1.o obj2.o
NOT
gcc -o -O2 exe_name obj1.o obj2.o
But, that will not do any optimization, because that is
linking which won't do any real optimization.
What you need to do is change your compile line
that creates the .o files to look like
gcc -c -O2 obj1.c
Good luck!
Dan
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com