I'm on Windows and Visual studio and i want to realise this :<br><br><a href="http://techbase.kde.org/Projects/Marble/MarbleCPlusPlus">http://techbase.kde.org/Projects/Marble/MarbleCPlusPlus</a><br><br>I compile Marble with Visual Studio to get the include (headers files .h) the lib (marblewidget.lib) and the dll (marblewidget.dll) i needed.<br>
<br>I create a new project, i place the dll respectively in the release and the debug folder and i place the marbleInclude folder and the marblewidget.lib next to the release and debug one.<br><br>I also place some other dll that the application needed :<br>
<br>QtCore4.dll<br>QtGui4.dll<br>QtNetwork4.dll<br>QtSvg4.dll<br>QtWebKit4.dll<br>QtXml4.dll<br><br>I place them in the debug and release folder.<br><br>There is my .pro file :<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
TEMPLATE = app<br>TARGET = <br>DEPENDPATH += . marble<br>INCLUDEPATH += .<br>LIBS += -lmarblewidget<br><br>SOURCES += Main.cpp<br clear="all"></blockquote><br>Here my Main.cpp :<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
#include <QtGui><br>#include <QtGui/qapplication.h><br>#include <marble/MarbleWidget.h><br> <br>using namespace Marble;<br> <br>int main(int argc, char** argv)<br>{<br> QApplication app(argc,argv);<br>
<br> // Create a Marble QWidget without a parent<br> MarbleWidget *mapWidget = new MarbleWidget();<br> <br> // Load the OpenStreetMap map<br> mapWidget->setMapThemeId("C:\\openstreetmap.dgml");<br>
<br> mapWidget->show();<br><br> return app.exec();<br>}<br></blockquote><br>With this i'm able to launch my application (no build error) but :<br><br>In release, the widget is a black windows where i can right click and "add mesure point" "set home location" (so the widget is working right ?) but there is no background, no map at all. (the file "openstreetmap.dgml" is on the right place)<br>
<br>In debug, the programme just stop at this line :<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">MarbleWidget *mapWidget = new MarbleWidget();<br>
</blockquote><div><br>I'm a bit new to C++ and Qt but any help should be apprecied !!<br></div><br>-- <br>Cordialement Morgan Ozeau<br><br>