libtool
[Top][All Lists]
Advanced

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

Re: help with C API in C++ static library


From: Bob Friesenhahn
Subject: Re: help with C API in C++ static library
Date: Fri, 15 Jan 2010 15:25:31 -0600 (CST)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Fri, 15 Jan 2010, Jason Kraftcheck wrote:

I am trying to build a static library that is implemented in C++ and has a C
API.  The resulting .la does not appear to include any information
indicating that the library needs to be either linked with C++ or explicitly
include the C++ runtime libraries.  Thus when I try to link a simple test
application written in C, the link step fails because of unresolved symbols
provided by the C++ runtime libraries.  What are my options at this point?
The ideal solution (for me) would be for libtool to include the C++ runtime
libraries in dependency_libs for the .la.  Is this possible?

I think that the only reliable option is to always link with the C++ compiler. Simply linking with the C++ standard library might not be sufficient to achieve a properly working program.

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]