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: Yuri
Subject: Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new
Date: Sun, 23 Jun 2019 18:15:55 -0700
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 2019-06-23 17:29, Bob Friesenhahn wrote:


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.



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


Yuri



reply via email to

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