[Top][All Lists]

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

Re: libtool uses cc to link a mixed C/C++ project and fails to find oper

From: Bob Friesenhahn
Subject: Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new
Date: Sun, 23 Jun 2019 19:29:32 -0500 (CDT)
User-agent: Alpine 2.20 (GSO 67 2015-01-07)

On Sun, 23 Jun 2019, Yuri wrote:
Those variables could be used to tune build process.
For instance CXX=my-c++ ./configure ... could be used to change C++ compiler.

It seems to know that c++ is the C++ compiler, but then uses cc anyway:

I doubt that libtool can be smart enough to intuit when the C++ compiler needs to be used for linking when the program being linked is C. The only way it could tell this is via library dependencies. Just supplying the library dependencies is not enough.

C++ introduces a new wrinkle in that there are now often 3 or 4 different C++ variants available based on C++ standard level, and library options (e.g. different C++ STL library implementations).

Things have changed quite a lot in the past several years when it comes to C++.

In addition to being linked using the C++ compiler, the correct options would need to be passed to the C++ compiler so that the correct standard level and libraries are used.

Bob Friesenhahn
GraphicsMagick Maintainer,
Public Key,

reply via email to

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