Compilation fails with --enable-pch after global header move

Stephan Bergmann sbergman at redhat.com
Thu Apr 25 00:35:16 PDT 2013


On 04/25/2013 09:00 AM, Aurimas Fišeras wrote:
> I build with these options:
> ./configure --enable-hardlink-deliver --enable-pch --disable-odk
> --without-help --without-java --with-lang=lt

> In file included from ~/libreoffice-git/svtools/inc/pch/precompiled_svt.hxx:428:0:
> ~/libreoffice-git/include/vcl/controllayout.hxx:58:5: error: reference to ‘Pair’ is ambiguous
> In file included from ~/libreoffice-git/include/vcl/mapmod.hxx:23:0,
>                  from ~/libreoffice-git/include/vcl/bitmap.hxx:26,
>                  from ~/libreoffice-git/include/vcl/graph.hxx:26,
>                  from ~/libreoffice-git/include/svtools/DocumentToGraphicRenderer.hxx:29,
>                  from ~/libreoffice-git/svtools/inc/pch/precompiled_svt.hxx:17:
> ~/libreoffice-git/include/tools/gen.hxx:33:23: error: candidates are: class Pair
> In file included from ~/libreoffice-git/workdir/unxlngx6.pro/UnoApiHeadersTarget/offapi/normal/com/sun/star/awt/grid/XSortableGridData.hdl:6:0,
>                  from ~/libreoffice-git/workdir/unxlngx6.pro/UnoApiHeadersTarget/offapi/normal/com/sun/star/awt/grid/XSortableGridData.hpp:6,
>                  from ~/libreoffice-git/svtools/inc/pch/precompiled_svt.hxx:98:
> ~/libreoffice-git/workdir/unxlngx6.pro/UnoApiHeadersTarget/udkapi/normal/com/sun/star/beans/Pair.hdl:16:63: error:                 template<class typeparam_T, class typeparam_U> struct com::sun::star::beans::Pair
> In file included from ~/libreoffice-git/svtools/inc/pch/precompiled_svt.hxx:428:0:
> ~/libreoffice-git/include/vcl/controllayout.hxx:58:5: error: ‘Pair’ does not name a type
> make[1]: *** [~/libreoffice-git/workdir/unxlngx6.pro/PrecompiledHeader/nodebug/precompiled_svt.hxx.gch] Error 1
> make[1]: *** Waiting for unfinished jobs...

git grep -Fw using include/ | grep -Fw beans

reveals that some headers dare pollute the global namespace with 
inappropriate using directives.  /All/ those using directives (not just 
the ones injecting com::sun::star::uno::beans) apparently need to be 
cleaned up.

Stephan


More information about the LibreOffice mailing list