On Sat, 5 Sep 2009, Alastair M. Robinson wrote: > >> That's on purpose. lcms 2.0 compiles cleanly as C++ code, so there is >> no need of the extern "C" anymore for C++ projects. > > That's fine if you're using a C++ compiler to build it as a static > library - but on Linux lcms is built (in C mode) as a shared library. > To link that with a C++ project, the C++ compiler needs to know that the > library functions should be called with C name-mangling and calling > conventions. Without adding the extern "C" { } construct I could
Yes, that is the function of extern "C". It allows both C and C++ to use the library. It is definitely required. > Speaking of libraries and linking, is there any chance the name of > the library itself could be changed to lcms2 (to match the header > file) or something similar? That would allow both LCMS1 and 2 to be > installed and linkable simultaneously. As it currently stands, if > you install LCMS2 from source on Linux, the liblcms.so symlink will > be changed to point to LCMS2, and it will no longer be possible to > build software against LCMS1! It is indeed quite important that lcms2 be capable of coexisting for several years with lcms1 since lcms2 is not API compatible with the older library and it will take years for applications to adapt. If lcms2 can be installed in parallel without contention, adoption of the new version will be much faster. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user