bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool does not add stdc++ when linking on Linux


From: Bob Friesenhahn
Subject: Re: libtool does not add stdc++ when linking on Linux
Date: Fri, 20 Jun 2008 13:59:23 -0500 (CDT)

On Fri, 20 Jun 2008, Christian Thalinger wrote:

On Thu, 2008-06-19 at 13:40 -0500, Bob Friesenhahn wrote:
In my experience, the only portable way to deal with C++ dependencies
from a C program is to link the C program using the C++ compiler.

How can I do that, portably, with my convenience libraries?

It is true that dependency information may be lacking from the convenience libraries but ultimately the program needs to be linked using the C++ compiler in order to be sure that everything will work. G++ usually adds libstdc++ as an implicit dependency so the linkage should work.

I am not excusing libtool for not listing libstdc++ as a dependency. It may be that the missing dependency information is actually due to GCC not specifying it as a dependency since libtool typically obtains this information from GCC. Linux is usually resistent to specifying explicit dependencies so it may be that GCC does not list this dependency on Linux but it does on Solaris.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]