Cross compiling page in techbase

Carlo brandon.ml at gmail.com
Fri Mar 14 01:16:47 CET 2008


On Fri, Mar 14, 2008 at 1:15 AM, Alexander Neundorf <neundorf at kde.org> wrote:
>
> On Thursday 13 March 2008, Carlo wrote:
>  > On Thu, Mar 13, 2008 at 7:07 PM, Alexander Neundorf <neundorf at kde.org>
>  wrote:
>  > > On Thursday 13 March 2008, Carlo wrote:
>  > >  > On Thu, Mar 13, 2008 at 1:11 AM, Alexander Neundorf <neundorf at kde.org>
>  > >
>  > >  wrote:
>  > >  ...
>  > >
>  > > > >  Is that using the modified FindKDE4.cmake ?
>  > > > >
>  > >  > >  mingw32-kdelibs.cmake sets KDE4_DATA_DIR, and if this is set,
>  > >  > > FindKDE4.cmake should use it to load FindKDE4Internal.cmake, which
>  > >  > > will load
>  > >  > >  KDELibsDependencies.cmake, which contains all these settings from
>  > >  > > the installed kdelibs.
>  > >  > >
>  > >  > >  What is going wrong ?
>  > >  > >  How does the installed KDELibsDependencies.cmake look like, i.e.
>  > >  > > are the paths in that file the same as the real locations ?
>  > >  >
>  > >  > Yes it uses the modified FindKDE4.cmake  and KDE4_DATA_DIR is set
>  > >  > the problem is that  KDELibsDependencies.cmake uses
>  > >  > ${KDE4_INSTALL_DIR} that is retrieved from this code
>  > >  > get_filename_component(_DIR ${KDE4_KDECONFIG_EXECUTABLE} PATH )
>  > >  > get_filename_component(KDE4_INSTALL_DIR ${_DIR} PATH )
>  > >  > but KDE4_KDECONFIG_EXECUTABLE is setted to the linux one, if i set it
>  > >  > to the windows one it goes ahead and it find include and library dir
>  > >  > but it doesn't find kde4automoc and kconfig_compiler
>  > >  > -- Found KDE 4.1 include dir: /windows/kde4/include
>  > >  > -- Found KDE 4.1 library dir: /windows/kde4/lib
>  > >  > -- Didn't find the KDE4 kconfig_compiler preprocessor
>  > >  > -- Didn't find the KDE4 automoc
>  > >
>  > >  Please update your FindKDE4Internal.cmake, I committed a change so that
>  > > now KDE4_INSTALL_DIR is determined relative to the location of the
>  > > installed FindKDE4Internal.cmake instead of kde4-config.exe. This should
>  > > help for now for this problem.
>  > >
>  > >  > > > for some strange reason for kde4automoc it calls
>  > >  > > > ../bin/kde4automoc instead of ../bin/kde4automoc.exe one that's
>  > >  > > > why i made the link in
>  > >  > >
>  > >  > >  Is the .exe extension really required to run the executable ?
>  > >  > >  Under Windows it isn't. Is this a wine speciality ?
>  > >  >
>  > >  > no, the problem here is that cmake wants to run makekdewidgets.exe,
>  > >  > maybe it tries to run makekdewidgets.exe.bat while kde4automoc is
>  > >  > called directly
>  > >
>  > >  Ok, I lost track.
>  > >  How does it call makekdewidgets, how does it call kde4automoc, and which
>  > > of the two is the problem ?
>  >
>  > kde4automoc is called in this way
>  > cd /home/kdeuser/kde/src/KDE/kdelibs/build/kdewidgets &&
>  > ../bin/kde4automoc
>  > /home/kdeuser/kde/src/KDE/kdelibs/build/kdewidgets/makekdewidgets_automoc.c
>  >pp /home/kdeuser/kde/src/KDE/kdelibs/kdewidgets
>
> > /home/kdeuser/kde/src/KDE/kdelibs/build/kdewidgets
>  > /home/kdeuser/kde/src/qt-copy/bin/moc
>  >
>  > while makekdewidgets
>  > cd /home/kdeuser/kde/src/KDE/kdelibs/build/kdewidgets &&
>  > ../bin/makekdewidgets.exe -o
>  > /home/kdeuser/kde/src/KDE/kdelibs/build/kdewidgets/kdewidgets.cpp
>  > /home/kdeuser/kde/src/KDE/kdelibs/kdewidgets/kde.widgets
>  >
>  > so here the problem is that we should call makekdewidgets without the
>  > .exe extension otherwise it's runned by wine
>
>  Ah, ok.
>  I'll check why it behaves differently.
>  If we would require cmake 2.6 we would have full support for this problem,
>  I'll see if we can get it to work with having cmake 2.6 only optionally.
>
>
>  > >  > >  Ok. This is as far as I see always undefined references from
>  > >  > > QtUiTools to QtCore:
>  > >  > > /windows/kde4/lib/libQtUiTools.a(quiloader.o):quiloader.cpp:(.text+0
>  > >  > >x7fd): undefined reference to `__imp___ZNK7QString6toUtf8Ev'
>
> > >  > >
>  > >  > >  Which value does QT_QTUITOOLS_LIBRARY have ?
>  > >  >
>  > >  > /windows/kde4/lib/libQtUiTools.a
>  > >  > anyway I've find out that it could be fixed by just removing
>  > >  > /windows/kde4/lib/libQtCore4.a and adding -lQtCore4 instead of every
>  > >  > Qt lib
>  > >
>  > >  Is libQtUiTools.a a static or a shared library ?
>  > >  Don't they usually have the suffix .dll or .lib ?
>  >
>  > it should be a shared library, i'm not sure but i think that .dll are
>  > needed for runtime, while .a are just for linking and .lib are static
>  > library compiled with visual c++, btw i get this error with both qt4
>  > from the kdewin installer and the precompiled one from trolltech
>
>  Does it work if you set QT_QTUITOOLS_LIBRARY to the QtUiTools library followed
>  by the QtCore library ? This should fix the undefined references.
do you mean something like this?
"/windows/kde4/lib/libQtUiTools.a  /windows/kde4/lib/libQtCore4.a"



More information about the Kde-windows mailing list