public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* g++ and libstdc++
@ 2011-01-10 20:50 Deol, Mandeep
  2011-01-10 22:07 ` Jonathan Wakely
  0 siblings, 1 reply; 4+ messages in thread
From: Deol, Mandeep @ 2011-01-10 20:50 UTC (permalink / raw)
  To: gcc-help

Hi All,
 
I am working on a project to switch our gcc compiler from version  3.4.6 to 4.4.5. Our current build machines have 3.4.6 as the default c++ compiler and we installed 4.4.5 at a different location (/apps/gcc/......). The new installation of 4.4.5 comes with its own set of c++ headers and libstdc++, thus when I try to run the app built with the newer version of the compiler it does not run. I know one way to get this to work is to update libstdc++ on the system or set LD_LIBRARY_PATH to use the newer libs. I am wondering if it is some how possible to get 4.4.5 to use the old headers and libstdc++? 
 
Thanks in advance,
Mandeep Deol

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: g++ and libstdc++
  2011-01-10 22:07 ` Jonathan Wakely
@ 2011-01-10 21:43   ` Deol, Mandeep
  2011-01-10 23:18     ` Jonathan Wakely
  0 siblings, 1 reply; 4+ messages in thread
From: Deol, Mandeep @ 2011-01-10 21:43 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

Thanks Jonathan.

Just a follow up.

"more strictly-confirming 4.4.5 compiler will complain about"

Does 4.4.5 have a dependency(recommendation) on any particular version of libstdc++? 
If I had built 4.4.5 as a native compiler on my build machine to replace the old version; would it have updated my libstdc++ installed at /usr/lib?

I am really having a lot of trouble understading the relationship between g++ and libstdc++.



-----Original Message-----
From: Jonathan Wakely [mailto:jwakely.gcc@gmail.com] 
Sent: Monday, January 10, 2011 4:23 PM
To: Deol, Mandeep
Cc: gcc-help
Subject: Re: g++ and libstdc++

On 10 January 2011 20:50, Deol, Mandeep <mdeol@ti.com> wrote:
> Hi All,
>
> I am working on a project to switch our gcc compiler from version  3.4.6 to 4.4.5. Our current build machines have 3.4.6 as the default c++ compiler and we installed 4.4.5 at a different location (/apps/gcc/......). The new installation of 4.4.5 comes with its own set of c++ headers and libstdc++, thus when I try to run the app built with the newer version of the compiler it does not run. I know one way to get this to work is to update libstdc++ on the system or set LD_LIBRARY_PATH to use the newer libs.

You can also set an RPATH in the app, using -Wl,-rpath,/apps/gcc/...../lib (or .../lib64) so the runtime linker knows where to find the libraries without needing LD_LIBRARY_PATH.

> I am wondering if it is some how possible to get 4.4.5 to use the old headers and libstdc++?

Probably not.

I can't think of any offhand, but there are probably some bugs in the old libstdc++ headers which were not diagnosed by GCC 3.4.5, but which the newer, more strictly-confirming 4.4.5 compiler will complain about.

You could try it though, by using -I/apps/gcc/.../include and -L/apps/gcc/..../lib

You might need to specify other directories for platform-specific headers and libraries, use -v to see the default include and library paths.  You might also be able to make use of -nostdinc++

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: g++ and libstdc++
  2011-01-10 20:50 g++ and libstdc++ Deol, Mandeep
@ 2011-01-10 22:07 ` Jonathan Wakely
  2011-01-10 21:43   ` Deol, Mandeep
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Wakely @ 2011-01-10 22:07 UTC (permalink / raw)
  To: Deol, Mandeep; +Cc: gcc-help

On 10 January 2011 20:50, Deol, Mandeep <mdeol@ti.com> wrote:
> Hi All,
>
> I am working on a project to switch our gcc compiler from version  3.4.6 to 4.4.5. Our current build machines have 3.4.6 as the default c++ compiler and we installed 4.4.5 at a different location (/apps/gcc/......). The new installation of 4.4.5 comes with its own set of c++ headers and libstdc++, thus when I try to run the app built with the newer version of the compiler it does not run. I know one way to get this to work is to update libstdc++ on the system or set LD_LIBRARY_PATH to use the newer libs.

You can also set an RPATH in the app, using
-Wl,-rpath,/apps/gcc/...../lib (or .../lib64) so the runtime linker
knows where to find the libraries without needing LD_LIBRARY_PATH.

> I am wondering if it is some how possible to get 4.4.5 to use the old headers and libstdc++?

Probably not.

I can't think of any offhand, but there are probably some bugs in the
old libstdc++ headers which were not diagnosed by GCC 3.4.5, but which
the newer, more strictly-confirming 4.4.5 compiler will complain
about.

You could try it though, by using -I/apps/gcc/.../include and
-L/apps/gcc/..../lib

You might need to specify other directories for platform-specific
headers and libraries, use -v to see the default include and library
paths.  You might also be able to make use of -nostdinc++

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: g++ and libstdc++
  2011-01-10 21:43   ` Deol, Mandeep
@ 2011-01-10 23:18     ` Jonathan Wakely
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Wakely @ 2011-01-10 23:18 UTC (permalink / raw)
  To: Deol, Mandeep; +Cc: gcc-help

On 10 January 2011 21:43, Deol, Mandeep wrote:
> Thanks Jonathan.
>
> Just a follow up.
>
> "more strictly-confirming 4.4.5 compiler will complain about"
>
> Does 4.4.5 have a dependency(recommendation) on any particular version of libstdc++?
> If I had built 4.4.5 as a native compiler on my build machine to replace the old version; would it have updated my libstdc++ installed at /usr/lib?
>
> I am really having a lot of trouble understading the relationship between g++ and libstdc++.

It's not difficult, they are developed and released together.  You
need to use the version of libstdc++ that comes with the version of
gcc you're using.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-10 23:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-10 20:50 g++ and libstdc++ Deol, Mandeep
2011-01-10 22:07 ` Jonathan Wakely
2011-01-10 21:43   ` Deol, Mandeep
2011-01-10 23:18     ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).