On Fri, 15 Jan 2010, Jason Kraftcheck wrote:
Linking with the C++ compiler would address my immediate problem of linking my test code, by still produces a library intended to be linked with C code that requires using the c++ compiler to link. I had hoped that libtool's .la files would provide the same feature for static libraries as the shared library dependency list.
What you are trying/wanting to do is just not portable. Sometimes it won't work at all. Sometimes it will appear to work most of the time. Sometimes it will always work.
Why doesn't libtool include necessary runtime libraries in the dependency_libs field of .la files? I understand that historically there were other issues like initialization of static/global data in C++ code. Is that still an issue on some platforms? The GNU compiler seems to handle this correctly for a simple test case.
Libtool does not encourage behavior which is not portable or is unreliable. Libtool is not capable of changing history. Older systems continue to be in active use.
It is true that C++ does require more/different initialization than C code does. The C compiler is not assured to supply the necessary initialization required by C++ code.
Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool