This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Problem compiling Marble, QQuickItem

Tags: None
(comma "," separated)
fbarbarin
Registered Member
Posts
16
Karma
0

Problem compiling Marble, QQuickItem

Thu Apr 09, 2015 12:20 pm
Hi everyone,
I am starting using Qt and I want to use Marble in one of my projects. I tried to compile it following this topic : https://techbase.kde.org/Projects/Marbl ... sCompiling.
I am using Windows 7, Qt 5.4.1, the last version of Marble, MinGW 4.91 (32bits).
I had an issue with the make command : QQuickPaintedItem not found. I took a look in the CMakeLists.txt file, in the root directory and saw that these two lines were missing :
Code: Select all
find_package(Qt5Quick REQUIRED)

Code: Select all
include_directories( ${Qt5Quick_INCLUDE_DIRS} )

I added them, but now I still have errors :

[bug]CMakeFiles\marblewidget.dir/objects.a(MarbleQuickItem.obj):MarbleQuickItem.cpp:(
.text+0x5f): undefined reference to `_imp___ZNK10QQuickItem5widthEv'
CMakeFiles\marblewidget.dir/objects.a(MarbleQuickItem.obj):MarbleQuickItem.cpp:(
.text+0x7b): undefined reference to `_imp___ZNK10QQuickItem6heightEv'
CMakeFiles\marblewidget.dir/objects.a(MarbleQuickItem.obj):MarbleQuickItem.cpp:(
.text+0xd8): undefined reference to `_imp___ZN17QQuickPaintedItem6updateERK5QRec
t'
CMakeFiles\marblewidget.dir/objects.a(MarbleQuickItem.obj):MarbleQuickItem.cpp:(
.text+0x2b3): undefined reference to `_imp___ZN17QQuickPaintedItemC2EP10QQuickIt
em'
CMakeFiles\marblewidget.dir/objects.a(MarbleQuickItem.obj):MarbleQuickItem.cpp:(
.text+0x4de): undefined reference to `_imp___ZN10QQuickItem23setAcceptedMouseBut
tonsE6QFlagsIN2Qt11MouseButtonEE'
CMakeFiles\marblewidget.dir/objects.a(MarbleQuickItem.obj):MarbleQuickItem.cpp:(
.text+0x601): undefined reference to `_imp___ZN17QQuickPaintedItemD2Ev'
CMakeFiles\marblewidget.dir/objects.a(MarbleQuickItem.obj):MarbleQuickItem.cpp:(
.text+0x6ca): undefined reference to `_imp___ZNK17QQuickPaintedItem20contentsBou
ndingRectEv'
C:/Qt/Qt5.4.1mingw/Tools/mingw491_32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../..
/../../i686-w64-mingw32/bin/ld.exe: CMakeFiles\marblewidget.dir/objects.a(Marble
QuickItem.obj): bad reloc address 0x7 in section `.text$_ZN6Marble24QuickItemSel
ectionRubberD0Ev[__ZN6Marble24QuickItemSelectionRubberD0Ev]'
collect2.exe: error: ld returned 1 exit status
src\lib\marble\CMakeFiles\marblewidget.dir\build.make:15690: recipe for target '
src/lib/marble/libmarblewidget.dll' failed
mingw32-make[2]: *** [src/lib/marble/libmarblewidget.dll] Error 1
CMakeFiles\Makefile2:1401: recipe for target 'src/lib/marble/CMakeFiles/marblewi
dget.dir/all' failed
mingw32-make[1]: *** [src/lib/marble/CMakeFiles/marblewidget.dir/all] Error 2
makefile:145: recipe for target 'all' failed
mingw32-make: *** [all] Error 2[/bug]

Do you have any idea what did I miss or misunderstand ?
Thanks a lot
vfr
Registered Member
Posts
3
Karma
0
Hi

I had something similar (not all libraries to link) and solved it by adding the following lines to src/lib/marble/CMakeLists.txt in the TARGET_LINK_LIBRARIES command for Qt5 (about line 350):

Code: Select all
${Qt5Quick_LIBRARIES}
${Qt5PrintSupport_LIBRARIES}


Hope this helps!
fbarbarin
Registered Member
Posts
16
Karma
0
Hi !
Thanks for your answer ! I really think this was exactly what I needed. I can't really try it because I am not able to run the
Code: Select all
mingw32-make
command anymore. The process freezes almost every line with "Building CXX object..." and I have to relaunch the mingw32 command to go through this line and be stuckwith the nexto one. It's a problem and I really don't have any idea why. I have a problem with my mingw.

Do you have any idea ?

Thanks again
User avatar
tackat
KDE Developer
Posts
131
Karma
0
OS
Could someone submit a tested patch for this to https://git.reviewboard.kde.org/dashboard/ ? :-)
That would be awesome!


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]