Marble/MarbleWindows: Difference between revisions
Neverendingo (talk | contribs) m (Text replace - "<code bash>" to "<syntaxhighlight lang="bash">") |
Neverendingo (talk | contribs) m (Text replace - "<code>" to "<syntaxhighlight lang="text">") |
||
Line 2: | Line 2: | ||
#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 like this :< | #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) |
Revision as of 20:49, 29 June 2011
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 :<syntaxhighlight lang="text">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 : )<syntaxhighlight lang="bash">qmake
- then build it:<syntaxhighlight lang="bash">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 :
Then you should be able to use Qt Creator as usually.
- 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: 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 ) ]