[Marble-devel] Beginner problem
M.Ozeau
m.ozeau at gmail.com
Fri Aug 26 14:36:59 UTC 2011
Thx for Answer Konrad but it still the same. And i think the pb come at the
line
> MarbleWidget *mapWidget = new MarbleWidget();
>
Cuz in debug the program stop (with no error oO) at this one.
But in release i can draw lines with 2 mesure point and see that the earth
is here (i can rotate and zoom) but on a black windows.
Is there something i'm missing ??
Cordialy Morgan OZEAU
2011/8/25 Konrad Enzensberger <e.konrad at mpegcode.com>
> **
> hi,
>
> >> mapWidget->setMapThemeId("C:\\openstreetmap.dgml");
> i think this will not work, you have to use something like:
>
> QString qsThemeId =
> "earth/openstreetmap/openstreetmap.dgml";
> mapWidget->setMapThemeId(qsThemeId);
> also from marble git, copy the data folder without changes to e.g.
> C:\maps\
>
> If you start from VisualStudio, add a command argument to your settings
> to set the data path to marblewidget:
>
> --marbledatapath c:\maps\data
>
> this works for me,
>
> regards, konrad
>
> ----- Original Message -----
>
> *From:* M.Ozeau <m.ozeau at gmail.com>
> *To:* marble-devel at kde.org
> *Sent:* Thursday, August 25, 2011 4:27 PM
> *Subject:* [Marble-devel] Beginner problem
>
> I'm on Windows and Visual studio and i want to realise this :
>
> http://techbase.kde.org/Projects/Marble/MarbleCPlusPlus
>
> I compile Marble with Visual Studio to get the include (headers files .h)
> the lib (marblewidget.lib) and the dll (marblewidget.dll) i needed.
>
> 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.
>
> I also place some other dll that the application needed :
>
> QtCore4.dll
> QtGui4.dll
> QtNetwork4.dll
> QtSvg4.dll
> QtWebKit4.dll
> QtXml4.dll
>
> I place them in the debug and release folder.
>
> There is my .pro file :
>
> TEMPLATE = app
>> TARGET =
>> DEPENDPATH += . marble
>> INCLUDEPATH += .
>> LIBS += -lmarblewidget
>>
>> SOURCES += Main.cpp
>>
>
> Here my Main.cpp :
>
> #include <QtGui>
>> #include <QtGui/qapplication.h>
>> #include <marble/MarbleWidget.h>
>>
>> using namespace Marble;
>>
>> int main(int argc, char** argv)
>> {
>> QApplication app(argc,argv);
>>
>> // Create a Marble QWidget without a parent
>> MarbleWidget *mapWidget = new MarbleWidget();
>>
>> // Load the OpenStreetMap map
>> mapWidget->setMapThemeId("C:\\openstreetmap.dgml");
>>
>> mapWidget->show();
>>
>> return app.exec();
>> }
>>
>
> With this i'm able to launch my application (no build error) but :
>
> 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)
>
> In debug, the programme just stop at this line :
>
> MarbleWidget *mapWidget = new MarbleWidget();
>>
>
> I'm a bit new to C++ and Qt but any help should be apprecied !!
>
> --
> Cordialement Morgan Ozeau
>
> ------------------------------
>
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel
>
>
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel
>
>
--
Cordialement Morgan Ozeau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20110826/2c7dc3b9/attachment.html>
More information about the Marble-devel
mailing list