Exporting templates on Windows (Re: [Libreoffice-commits] .: 7 commits - clucene/patches clucene/source configure.in cppuhelper/inc hwpfilter/source sal/inc solenv/gbuild vbahelper/inc)

Lubos Lunak l.lunak at suse.cz
Mon Mar 12 11:15:09 PDT 2012


On Monday 12 of March 2012, Michael Stahl wrote:
> On 12/03/12 15:09, Lubos Lunak wrote:
> >  Windows/MSVC experts
...
> applying logic to how C++ features interact with linkers on various
> platforms is generally a futile endeavour.

 Works fine for me :).

> >  Assuming that this commit really breaks it on MSVC and the proper change
> > there is to remove the DLLPUBLIC from the template and hope the compiler
> > and linker sort it out somehow, then I guess we'll need to add
> > SAL_TEMPLATE_DLLPUBLIC which does nothing with MSVC and the right thing
> > with gcc/clang.
>
> Voreppe tinderbox is already complaining rather loudly...
>
> >  MSDN article on the dllimport/dllexport flags feels like it doesn't
> > actually say anything, but reading
> > http://support.microsoft.com/kb/132044/en-us makes me think the flags are
> > just optimizations, so nothing will break. But according to it
> > SAL_TEMPLATE_DLLPUBLIC would be the right thing.
>
> i recommend the following to understand the mess you got yourself into
> (link to archive.org because original has been purged):
>
> http://web.archive.org/web/20100504161204/http://blogs.sun.com/GullFOSS/ent
>ry/why_some_compilers_suck_more

 Based on this, I'm fairly certain SAL_DLLPUBLIC_TEMPLATE is the proper fix, 
making the template visible on Linux etc., but not doing any dllimport tricks 
on Windows. Committed.

-- 
 Lubos Lunak
 l.lunak at suse.cz


More information about the LibreOffice mailing list