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

Trouble running marble example in QT creator 5.1.0 Windows 7

Tags: None
(comma "," separated)
Plainsman
Registered Member
Posts
6
Karma
0
So I have been trying to figure this out for a few days now. I have successfully installed Marble using the instructions here:

https://techbase.kde.org/Projects/Marble/WindowsCompiling

I used the Visual Studio compile instructions and successfully built running executables for both debug and release. However only astro.dll and marblewidget.dll were built. From I created .lib files from these using the dumpbin and lib /def commands. This allowed me to successfully compile the QT project shown below. However, when I run the application I get the following error:

Starting C:\work\Testing\build-Test4-Desktop_Qt_5_1_0_MSVC2010_32bit_OpenGL-Release\release\Test4.exe...
The program has unexpectedly finished.
C:\work\Testing\build-Test4-Desktop_Qt_5_1_0_MSVC2010_32bit_OpenGL-Release\release\Test4.exe exited with code -1073741515


I realize I may be missing something very basic due to my lack of QT experience but any help would be greatly appreciated. Again my files are listed below.

.Pro file
QT += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = Test4
TEMPLATE = app


SOURCES += main.cpp

FORMS += mainwindow.ui

win32 {
INCLUDEPATH += $$quote(C:/work/Utils/Marble/Marble-Bin/Release/include/marble)
LIBS += $$quote(C:/work/Utils/Marble/Marble-Bin/Release/marblewidget.lib)
LIBS += $$quote(C:/work/Utils/Marble/Marble-Bin/Release/astro.lib)
}

main.cpp

#include <QApplication>
#include <MarbleWidget.h>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);

Marble::MarbleWidget m;
m.setProjection(Marble::Mercator);
m.setMapThemeId("earth/openstreetmap/openstreetmap.dgml");

m.setWindowTitle("Hello Marble!");
m.show();

return a.exec();
}
User avatar
Earthwings
KDE Developer
Posts
172
Karma
1
OS
The .lib files are now installed automatically. Can you update your Marble repository and try with them instead of self-generated ones.

Qt 5.1 is quite outdated. Any chance you can update to a newer Qt version also?
Sub028
Registered Member
Posts
3
Karma
0
OS
Hi,

I have the same problem ...

Unfortunately, I think it's not a Qt version problem because I use 5.7.0 and I have this error too.

I used Qt compile instructions from https://techbase.kde.org/Marble/QtCreator. All goes well, at the end I have a folder which look likes:
DIR: data
DIR: include
DIR: lib
DIR: plugins
DIR: share
DLL: libastro.dll
DLL: libmarbledeclarative.dll
DLL: libmarblewidget-qt5.dll

In Project Configuration Panel, all useless features (in my case) were disabled :

BUILD_MARBLE_APPS OFF
BUILD_MARBLE_EXAMPLES OFF
BUILD_MARBLE_TESTS OFF
BUILD_MARBLE_TOOLS OFF
BUILD_MARBLE_TESTING OFF
BUILD_WITH_DBUS OFF
CMAKE_BUILD_TYPE Release
STATIC_BUILD FALSE
WITH_DESIGNER_PLUGIN TRUE
WITH_KF5 OFF
WITH_Phonon OFF
WITH_Qt5Location OFF
WITH_Qt5Positioning OFF
WITH_ZLIB OFF
WITH_libgps OFF
WITH_liblocation OFF
WITH_libshp OFF
WITH_libwlocate OFF

I also try to set CMAKE_CXX_COMPILER = -std=c++11 but no difference ...

In fact, the problem appears when app (example app: hello_marble) is loading. App crash instantly after launching with a Windows report bug window which shows:
[...]
Default module name: bin\release\libastro.dll!__gxx_personality_v0
[...]


If I run this app in debug mode (from Qt), I have a little bit more details about error:

Exception at 0x77cbd3c2, code: 0xc0000139: DLL entry point not found, flags=0x0.
During startup program exited with code 0xc0000139

My .pro look likes this:
(only marble part)
#################################################
# QT-MARBLE

MARBLE_LIBRARY_PATH = ../lib/marble/
MARBLE_INCLUDE_PATH = ../lib/marble/include

# Add the path
LIBS += \
-L$$MARBLE_LIBRARY_PATH

LIBS += \
-lmarblewidget-qt5 \
-lmarbledeclarative \
-lastro

INCLUDEPATH += \
$$MARBLE_INCLUDE_PATH/marble
#################################################

(Paths are good.)

I can't use dll from binary releases because they are build with MSVC.

Thanks
Sub028
Registered Member
Posts
3
Karma
0
OS
A small detail:
- Compiler used: mingw5.3 32bits


Bookmarks



Who is online

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