[CMake] Does CMake have any known problems with C and C++ code
mixed together in the same library?
Matt Rogers
mattr at kde.org
Thu Sep 21 08:12:56 EDT 2006
On Thursday 21 September 2006 03:19, Alan W. Irwin wrote:
> Years ago I somehow got the impression it was not a good idea to mix C and
> C++ object code in the same library, but now I cannot find the reference
> (or I misinterpreted it in the first place).
>
> This really boils down to two questions:
>
> (1) Are there any known CMake issues with mixing C and C++ code in the
> same library?
>
> (2) Are there any known platform issues with same?
>
> I am interested in the answer to these questions because for one possible
> PLplot build option (where our device drivers are not built as plug-ins,
> but instead the driver code is made a part of normal libraries that are
> loaded by the run-time loader), I have the choice of putting a mixture of C
> and C++ code in the same library or else having separate C and C++
> libraries with circular (cross-) dependencies between them.
>
> Circular dependencies are a real pain so I am hoping mixing C and C++ code
> in the same library is actually okay to implement this particular build
> option for PLplot
>
> Alan
You can mix C and C++ in the same library. KDE does this in several places.
--
Matt
More information about the CMake
mailing list