[Okular-devel] Building on Windows
Albert Astals Cid
aacid at kde.org
Tue Mar 8 00:00:33 UTC 2016
El Monday 07 March 2016, a les 15:54:03, Jonathan Schultz va escriure:
> Hello all,
>
> On trying, and eventually succeeding in building Okular version 1.0.0
> under KF 5.5.0 and Windows 7, I found a few points (with the help of
> Thomas Friedrichsmeier on the kde-windows list) that probably need
> attention. Starting with the simplest and least difficult:
>
> 1. Line 14 of interfaces/viewerinterface.h refers to the _MSC_VER - this
> should be Q_OS_WIN
>
> 2. A whole bunch of symbols from /mobile/components/settings.cpp were
> missing when building libokularplugin.dll. This could be resolved by the
> following patch:
>
> diff --git a/mobile/components/CMakeLists.txt
> b/mobile/components/CMakeLists.txt index e09326a..d3ba32f 100644
> --- a/mobile/components/CMakeLists.txt
> +++ b/mobile/components/CMakeLists.txt
> @@ -30,6 +30,7 @@ target_link_libraries(okularplugin
> Qt5::Xml
> Qt5::Svg
> okularcore
> + okularpart
> KF5::KDELibs4Support
> )
>
> The only problem was that the symbols were then multiply defined. So I
> then applied the following:
>
> --- a/conf/settings.kcfgc
> +++ b/conf/settings.kcfgc
> @@ -4,7 +4,7 @@
> Inherits=SettingsCore
> Mutators=true
> Singleton=true
> -Visibility=OKULARPART_EXPORT
> +#Visibility=OKULARPART_EXPORT
> IncludeFiles=settings_core.h,okularpart_export.h
> SourceIncludeFiles=qdom.h,QStandardPaths
> MemberVariables=dpointer
>
> I admit that I don't have much idea whether these are correct solutions
> or just things that happen to work.
Yeah removing visibility doens't seem like the proper fix to be honest.
Maybe you can bring this to the kde windows list in case more people there can
help?
Cheers,
Albert
>
> 3. For some reason that I have no idea of, the build process (I'm using
> emerge) produces a dynamic library called libokularpart.dll, but the
> executable tries to find a library called okularpart.dll. Simply
> renaming the built library works as a work-around.
>
> With those changes, the code now builds and executes. There is then a
> problem opening a file, as the executable crashes on loading the open
> file dialog. If you provide a filename as an argument to the executable
> then it loads that file correctly. I haven't had a chance to look at
> this problem yet, but will do in due course.
>
> I mainly wanted to flag these problems with the build process and leave
> further issues for a later post.
>
> Best,
> Jonathan
>
> _______________________________________________
> Okular-devel mailing list
> Okular-devel at kde.org
> https://mail.kde.org/mailman/listinfo/okular-devel
More information about the Okular-devel
mailing list