Difference between revisions of "Projects/Marble/MarbleWindows"

Jump to: navigation, search
(work in progress)
 
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[ tested with Qt sdk 2010.02.1 ( Qt 4.6.2 ; Qt Creator 1.3.1 ; MinGW 3.15 ; GCC4.4.0 ) ]
+
In this page you will find instructions on how to build a Marble widget application on Windows.
  
#First of all you have to build marble following this method[[Projects/Marble/WindowsCompiling | "Compiling on Windows"]]
+
First of all you have to build marble following this method[[Projects/Marble/WindowsCompiling | "Compiling on Windows"]]
#Then your next step is to add the good path for building in your .pro file or in your Makefile. For example in yourproject.pro file add or modify :<code>win32 {
+
 
 +
Then your next step is to add the good path for building in your .pro file or in your Makefile. For example in yourproject.pro file add or modify like this :
 +
 
 +
<syntaxhighlight lang="text">win32 {
 
     INCLUDEPATH += $$quote(C:/Program Files/marble/include/marble)
 
     INCLUDEPATH += $$quote(C:/Program Files/marble/include/marble)
 
     LIBS += $$quote(C:/Program Files/marble/libmarblewidget.dll)
 
     LIBS += $$quote(C:/Program Files/marble/libmarblewidget.dll)
Line 9: Line 12:
 
     LIBS += -L/usr/local/lib \
 
     LIBS += -L/usr/local/lib \
 
     -lmarblewidget
 
     -lmarblewidget
}</code>
+
}</syntaxhighlight>
#(if you use .pro file then : )<code bash>qmake</code>
+
#then :<code bash>mingw32-make release</code> (the "release" flag is important due to to a problem of qt debugging libs building for VC++. otherwise you will have this kind of error "Microsoft Visual C++ Runtime Library" "runtime error")
+
#Normally your application should be build but before to be able to launch it you have to copy libmarblewidget.dll near your .exe or to  add its path to your system environment path. You also have to copy near your .exe the data\ and plugins\ directories otherwise you will have no maps and no download enabled.
+
  
-So here it is. You know how to build it in a console. Building it in Qt Creator should not be very difficult. The important part is to configure [to be continued]
+
(if you use .pro file then : )
 +
 
 +
<syntaxhighlight lang="bash">qmake</syntaxhighlight>
 +
 
 +
then build it:
 +
 
 +
<syntaxhighlight lang="bash">mingw32-make release</syntaxhighlight>
 +
 
 +
(the "release" flag '''is important''' due to to a problem of qt debugging libs built for VC++. Otherwise you will have this kind of error : "Microsoft Visual C++ Runtime Library" "runtime error")
 +
 
 +
Normally your application should be built but before to be able to launch it you have to copy libmarblewidget.dll near your .exe (or to  add its path to your system environment path). You also have to copy near your .exe the data\ and plugins\ directories otherwise you will have no maps and no download.
 +
 
 +
So here it is. You know how to build it in a console!
 +
 
 +
* Building it in Qt Creator should not be very difficult. The important part is to configure your project to call ming32-make with the "release" flag :
 +
 
 +
 
 +
[[Image:creator.png]]
 +
 
 +
 
 +
Then you should be able to use Qt Creator as usual.
 +
 
 +
* The next step you could want to do is to use marble widget plugin in Qt Designer.
 +
 
 +
(Note: here is how to use it in Qt Designer in standing alone; not the version embedded in Qt Creator.
 +
I have tried every configuration without being able to make it work that way.
 +
So here is only the way to do it in Qt Designer directly).
 +
 
 +
When you have installed Marble It should have copy the needed plugins in "C:\Qt\2010.02.1\qt\plugins\designer" but those plugins need libmarblewidget.dll to be accessible. So, like what we did for your application, we need to copy libmarblewidget.dll and "data\" next to "C:\Qt\2010.02.1\qt\bin\designer.exe" ( and eventually "plugins\" if we want to be able to download tiles when using marble widget in Qt Designer... ). Once this is done, you should have Marble's plugins available in Qt Designer:
 +
 
 +
[[Image:WINdesigner.png]]
 +
 
 +
Take a look [[Projects/Marble/MarbleDesigner | here]] for some more details.
 +
 
 +
 
 +
[ tested with Qt sdk 2010.02.1 ( Qt 4.6.2 ; Qt Creator 1.3.1 ; MinGW 3.15 ; GCC4.4.0 ) ]

Latest revision as of 10:34, 5 April 2012

In this page you will find instructions on how to build a Marble widget application on Windows.

First of all you have to build marble following this method "Compiling on Windows"

Then your next step is to add the good path for building in your .pro file or in your Makefile. For example in yourproject.pro file add or modify like this :

win32 {
    INCLUDEPATH += $$quote(C:/Program Files/marble/include/marble)
    LIBS += $$quote(C:/Program Files/marble/libmarblewidget.dll)
}
unix {
    LIBS += -L/usr/local/lib \
    -lmarblewidget
}

(if you use .pro file then : )

qmake

then build it:

mingw32-make release

(the "release" flag is important due to to a problem of qt debugging libs built for VC++. Otherwise you will have this kind of error : "Microsoft Visual C++ Runtime Library" "runtime error")

Normally your application should be built but before to be able to launch it you have to copy libmarblewidget.dll near your .exe (or to add its path to your system environment path). You also have to copy near your .exe the data\ and plugins\ directories otherwise you will have no maps and no download.

So here it is. You know how to build it in a console!

  • Building it in Qt Creator should not be very difficult. The important part is to configure your project to call ming32-make with the "release" flag :


Creator.png


Then you should be able to use Qt Creator as usual.

  • The next step you could want to do is to use marble widget plugin in Qt Designer.
(Note: here is how to use it in Qt Designer in standing alone; not the version embedded in Qt Creator. 
I have tried every configuration without being able to make it work that way.
So here is only the way to do it in Qt Designer directly).

When you have installed Marble It should have copy the needed plugins in "C:\Qt\2010.02.1\qt\plugins\designer" but those plugins need libmarblewidget.dll to be accessible. So, like what we did for your application, we need to copy libmarblewidget.dll and "data\" next to "C:\Qt\2010.02.1\qt\bin\designer.exe" ( and eventually "plugins\" if we want to be able to download tiles when using marble widget in Qt Designer... ). Once this is done, you should have Marble's plugins available in Qt Designer:

WINdesigner.png

Take a look here for some more details.


[ tested with Qt sdk 2010.02.1 ( Qt 4.6.2 ; Qt Creator 1.3.1 ; MinGW 3.15 ; GCC4.4.0 ) ]


This page was last modified on 5 April 2012, at 10:34. This page has been accessed 5,463 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal