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

Linker errors with GeoPainter

Tags: None
(comma "," separated)
ollelundin
Registered Member
Posts
4
Karma
0

Linker errors with GeoPainter

Thu Mar 16, 2017 9:27 am
Hi,
I just downloaded and compiled marble by following the guide found at https://community.kde.org/Marble/WindowsCompiling
When trying to compile a simple test project found at https://techbase.kde.org/Marble/Runners ... LineString I get a linker error regarding drawText and drawPolyline

release/main.o:main.cpp:(.text+0x147): undefined reference to `_imp___ZN6Marble10GeoPainter8drawTextERKNS_18GeoDataCoordinatesERK7QStringiiiiRK11QTextOption'
release/main.o:main.cpp:(.text+0x36d): undefined reference to `_imp___ZN6Marble10GeoPainter12drawPolylineERKNS_17GeoDataLineStringERK7QString6QFlagsINS_17LabelPositionFlagEE'
D:/Qt/Qt5.5.0/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: release/main.o: bad reloc address 0x2 in section `.text$_ZN14MyMarbleWidgetD1Ev[__ZN14MyMarbleWidgetD1Ev]'
collect2.exe: error: ld returned 1 exit status

Compiling on windows 7 with mingw492_32 and Qt5.5.0

The project file contains
INCLUDEPATH += $$quote(C:/Program Files (x86)/marble/include)
LIBS += $$quote(C:/Program Files (x86)/marble/libmarblewidget-qt5.dll)
and is set to compile for release

Any idea's why the linking fails?

Best regards
Olle
ollelundin
Registered Member
Posts
4
Karma
0

Re: Linker errors with GeoPainter

Thu Mar 16, 2017 9:57 am
Looking at libmarblewidget-qt5.dll with dependency walker shows the drawText to be decorated as
_ZN6Marble10GeoPainter8drawTextERKNS_18GeoDataCoordinatesERK7QStringddddRK11QTextOption which differs from the linker error which shows _ZN6Marble10GeoPainter8drawTextERKNS_18GeoDataCoordinatesERK7QStringiiiiRK11QTextOption

Best regards,
Olle
User avatar
Earthwings
KDE Developer
Posts
172
Karma
1
OS

Re: Linker errors with GeoPainter

Sat Mar 18, 2017 6:54 am
A mismatch between debug and release libraries maybe?
ollelundin
Registered Member
Posts
4
Karma
0

Re: Linker errors with GeoPainter

Wed Mar 22, 2017 7:43 am
Seems like the problem was include files from a previous installation of marble.

Now I have a new problem, the include files are not installed when executing "make install"
ollelundin
Registered Member
Posts
4
Karma
0

Re: Linker errors with GeoPainter

Wed Mar 22, 2017 8:22 am
Found this in src/lib/marble/CMakeList.txt

if (WIN32 OR APPLE)
# TODO: find how to install & deploy library, headers and config files as bundle for development
return()
endif()

Removed the return() and now the headers are installed.
No more linker errors with the newest marble.

As a windows developer I really feel like a second-class citizen when it comes to using open source libraries :(


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell