Can code compiled with g++ 3.3.1 run with earlier versions ofcompiler runtime environment?

Arora, Sudhanshu sarora@informatica.com
Thu Sep 23 15:11:00 GMT 2004


Sorry James, I forgot to mail to the  list.
-----Original Message-----
From: Arora, Sudhanshu 
Sent: Wednesday, September 22, 2004 7:23 PM
To: 'James E Wilson'
Subject: RE: Can code compiled with g++ 3.3.1 run with earlier versions
ofcompiler runtime environment?


Hi James,
	Thanks for your reply and Sorry for my late response. Actually, I tried to link statically with libstdc++ but then the problem arises with libgcc_s.so.1. I don't have a static version of this library with me. Is there a way I can get a static version of this lib? Or is there any other way to remove this dependency ?(which I think is not possible)
Thanks,
Sudhanshu

-----Original Message-----
From: James E Wilson [mailto:wilson@specifixinc.com]
Sent: Saturday, September 11, 2004 12:42 AM
To: Arora, Sudhanshu
Cc: Rathi, Dinesh; gcc@gcc.gnu.org
Subject: RE: Can code compiled with g++ 3.3.1 run with earlier versions
ofcompiler runtime environment?


On Thu, 2004-09-09 at 23:53, Arora, Sudhanshu wrote:
> Thanks a lot for your reply. But I don't understand what do you mean by 'configure gcc --disable-shared'.

--disable-shared is a configure option.  Add it to the command line you
use to configure gcc.

>  I tried this option in my env and it doesn't work.

You didn't give an actual bug report, so I am not able to help. 
"doesn't work" isn't enough info to go on.

> Is it equivalent to static option in gcc. i.e will it create static libs for me instead of dynamic libs? 

Yes, it will build only static libraries.  This is different than using
-static, because -static will link in a static libstdc++, but it will
also link in static system libraries like /lib/libc.so.  If you
configure gcc with the --disable-shared option, then when you link you
will get a static libstdc++ and a dynamic /lib/libc.so which is better.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com




More information about the Gcc mailing list