libtool
[Top][All Lists]
Advanced

[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 20:20:45 -0500 (CDT)
User-agent: Alpine 2.20 (GSO 67 2015-01-07)

On Sun, 23 Jun 2019, Yuri wrote:

So is there an easy way to override this and always use C++ way of linking?

To do this you might need to set LD or CC to your C++ compiler. A better way is to make your main program be C++ since that assures it can work.

Consider that C++ exceptions can not be thrown into C code unless a special compiler option is used so that C supports the exception framework. Without this you are likely to get a core dump.

C++ is very good at using C code but C code is not very good at using C++ code.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt



reply via email to

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