|
From: | Bob Friesenhahn |
Subject: | C library promoted to C++ linkage due to optional C++ source module |
Date: | Sat, 9 Mar 2024 11:48:40 -0600 |
User-agent: | Mozilla Thunderbird |
GraphicsMagick has several major build options which includes putting everything in its major library, or separating certain code into loadable modules. Automake conditionals are used to support the several major build options. When loadable modules are used, the C++ dependency is moved to the loadable modules and away from the major library.
The method that I am using to coax Automake into linking using the C++ linker is to include a technically empty 'acpplus.cpp' file as a component when building modules, libraries, or an executable. This approach works, but it has a problem. The problem is that if Automake sees that a C++ source file may be *optionally* included in a target, it promotes the linkage for that target to C++.
In my builds I see a library of C files being linked together with the C++ linker, even though no C++ code was actually built!
Is there a better solution or fix for this problem? Bob
[Prev in Thread] | Current Thread | [Next in Thread] |