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

Bob Friesenhahn <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <[email protected]>
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
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt

_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.