Re: [Lcms-user] Lcms and multithread

2009-09-07 Thread marti . maria
>> I've been evaluating this, and there are some drawbacks. One is you >> cannot use namespaces if extern "C" is being used (the behavior is >> then undefined and depends on the compiler) > > If it helps any, in Magick++ (C++ API for ImageMagick/GraphisMagick) > the *Magick C APIs do use extern "

Re: [Lcms-user] Lcms and multithread

2009-09-07 Thread Bob Friesenhahn
On Mon, 7 Sep 2009, marti.ma...@littlecms.com wrote: > > I've been evaluating this, and there are some drawbacks. One is you > cannot use namespaces if extern "C" is being used (the behavior is > then undefined and depends on the compiler) If it helps any, in Magick++ (C++ API for ImageMagick/Grap

Re: [Lcms-user] Lcms and multithread

2009-09-07 Thread marti . maria
Hi, > 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 c

Re: [Lcms-user] Lcms and multithread

2009-09-05 Thread Bob Friesenhahn
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)

Re: [Lcms-user] Lcms and multithread

2009-09-05 Thread Alastair M. Robinson
Hi :) marti.ma...@littlecms.com 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 li

Re: [Lcms-user] Lcms and multithread

2009-09-05 Thread marti . maria
Hi, > The first thing that caught me out was that lcms2.h has no extern "C" { } > construct for C++ support, so I had to add it to my own code. 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. > Secondly, there's somethin

Re: [Lcms-user] Lcms and multithread

2009-09-05 Thread Alastair M. Robinson
Hi :) Marti.Maria wrote: > Meanwhile, you could use the development > snapshop which is > complete but lacks documentation and qualification (so it is still buggy): > > http://www.littlecms.com/lcms-2.0-sep-2.tar.gz I've just given it a whirl, and ported the wrapper PhotoPrint uses to lcms2.

Re: [Lcms-user] Lcms and multithread

2009-09-05 Thread Marti.Maria
Hi Bob, As some of you may be aware, GraphicsMagick has become multithreaded via OpenMP. That's a big improvement. Congrats to all GraphicsMagick team. As you have already discovered, lcms 1.x has some important issues on multithreading. Some have been adressed in lcms 2.0, so maybe the bes

[Lcms-user] Lcms and multithread

2009-09-05 Thread Bob Friesenhahn
As some of you may be aware, GraphicsMagick has become multithreaded via OpenMP. My original implementation of speeding up CMS transforms assumed that lcms is thread safe so that all threads shared the same transform created by cmsCreateTransform(). It turns out that lcms is not as thread saf