interesting questions without answers about libraries

João Carlos Martins ttilt@k2sistemas.com.br
Wed Jun 2 15:54:00 GMT 2004


I searched for this question in the mailing lists but found no answers, 
so I'm sending this e-mail.

Q1) how can I build only the C/C++ libraries that comes with the 
compiler source and not the whole compiler (support libraries, libgcc 
etc)? Optionally, how can i build them to be static and not shared?

Q2) Suppose I install a new version of gcc. It´s installed in the 
default prefix (/usr/local) and I want to use that version instead of 
the default older version in prefix /usr. I set an environment var like 
'export GCC=/usr/local/bin/gcc' and use that in my makefiles. The 
question is, will the C/C++ shared libraries used be the ones that came 
w/ this new compiler, which are located in /usr/local/lib or the system 
default ones in /usr/lib? What if I use -L/usr/local/lib, will that 
override the use of the default libraries?

THANKS A LOT





More information about the Gcc-help mailing list