[calligra/calligra/2.9] libs/main: Fix for windows

Boudewijn Rempt boud at valdyas.org
Tue Jun 30 08:24:28 BST 2015


probably just fall-out from frinring's #include cleanup

On Tue, 30 Jun 2015, Stuart Dickson wrote:

> Git commit 1836aab229af8b7f09e0a831eef717392c95cddb by Stuart Dickson.
> Committed on 30/06/2015 at 00:02.
> Pushed by dickson into branch 'calligra/2.9'.
>
> Fix for windows
>
> We have to include KoPageLayout.h when using
> MSVC otherwise the linker cannot find the
> correct symbols in komain.lib
>
> It could be an issue with the setup of the build
> for the plugin which linked against it, or else
> a quirk of the compiler?
>
> M  +14   -1    libs/main/KoDocument.h
>
> http://commits.kde.org/calligra/1836aab229af8b7f09e0a831eef717392c95cddb
>
> diff --git a/libs/main/KoDocument.h b/libs/main/KoDocument.h
> index a69f649..59c3645 100644
> --- a/libs/main/KoDocument.h
> +++ b/libs/main/KoDocument.h
> @@ -41,13 +41,26 @@ class KoProgressUpdater;
> class KoProgressProxy;
> class KoDocumentInfoDlg;
> class KoUnit;
> -class KoPageLayout;
> class KoGridData;
> class KoGuidesData;
> class KoXmlWriter;
>
> class QDomDocument;
>
> +// MSVC seems to need to know the declaration of the classes
> +// we pass references of in, when used by external modules
> +// e.g.
> +//     when building chartshapecore.lib, the forward-declaration
> +//     appraoch lead to unresolved externals warnings when it used
> +//     the pagelayout functions.
> +//     Also when building calligra_shape_formular.dll - FormulaDocument
> +//     referenced the same two pagelayout functions incorrectly.
> +#if defined(_WIN32) || defined(_WIN64)
> +    #include <KoPageLayout.h>
> +#elif
> +    class KoPageLayout;
> +#endif
> +
> class KoVersionInfo
> {
> public:
>



More information about the calligra-devel mailing list