[CMake] Does CMake have any known problems with C and C++ code mixed together in the same library?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Sep 21 04:19:55 EDT 2006


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
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list