Registered Member
|
Hi All,
I have Qt setup for Visual Studio already, I am trying to integrate marble as well. I am not using QT creator.. I am using VS2010. I followed the instructions from here -> http://techbase.kde.org/Projects/Marble ... sCompiling After I complied Marble for VS using GIT. I used cmake to build binaries. Then finally build the solution from VS. My installation folder has marblewidget.dll instead of libmarblewidget.dll. I made sure I had QTOnly checked (cmake GUI). I tried couple of times and I always have marblewidget.dll only. What am I missing? Next, I still proceeded in copy pasting marblewidget.dll and /data near QT desinger.exe and I was able to view the marble widget from my QT Desinger. However when I am using it , I get a black screen and don't see the globe. What is I am doing wrong, is it not working since I am using marblewidget.dll instead of libmarblewidget.dll? Please point where I am wrong? One more question, If not marble is there anyway, I can use an Openstreetmap with QT . I want to build an application using QT and OSM. Thank You Harsha |
Registered Member
|
Here are the steps which works ok for me (VS2008), maybe this can help you...
0. Download and install prerequisites (except Visual Studio, which is already downloaded and installed, I guess): a) Qt (I download this package); b) CMake (here); c) Git tools and GUI client (I am using TortoiseGit). 1. Download / update sources from git (for example, with TortoiseGit). 2. Copy downloaded sources to some working dir %WORKSRC%, for example "D:\Works\Marble" (without quotes). 3. Run CMake GUI. a) press the "Browse Source..." button and select %WORKSRC% dir; b) press the "Browse Build..." button and select/create %WORKBLD% dir, for example "D:\Works\Marble\build.win32" (without quotes); c) press the "Configure" button and select your compiler (I select Visual Studio 9 2008); d) after generating process is done, you will see an error message - it's ok for this step. 4. Change some settings and reconfigure: a) expand "Ungrouped Entries" group in variables list and make sure that only the QTONLY checkbox is set (I always deselect TILES_AT_COMPILETIME); b) expand "CMAKE" group in variables list and set CMAKE_USE_RELATIVE_PATHS checkbox; c) again, press the "Configure" button. 5. Make last settings change: a) expand "WITH" group in variables list and make sure that all checkboxes are clear; optionally, you can set checkboxes "WITH_Phonon" (for audio support?) and/or "WITH_libshp" (needed for shapefiles plugin); b) if you selected "WITH_libshp", expand "LIBSHP" group in variables list and select shapelib source root dir for "LIBSHP_INCLUDE_DIR" and compiled shapelib static library file (shapelib.lib for me) for "LIBSHP_LIBRARIES"; c) expand "BUILD" group in variables list and make sure that all checkboxes are clear; optionally, you can leave "BUILD_TESTING" set; d) at last, press the "Configure" button. 6. Press "Generate" button. 7. Go to %WORKBLD% dir and open "marble.sln" solution file with Visual Studio. 8. In solution browser, locate project named "marble-qt" and set it as a start project. 9. Compile solution. Make sure that marblewidget.dll and most of plugins are compiled ok. 10. Create two new text files in %WORKSRC% dir, "make_release.cmd" and "plugins_list.txt", with the following contents: make_release.cmd
plugins_list.txt
11. To install compiled Marble to specified location (installed application can be copied anywhere, also on a machine without Qt and/or Visual Studio) run make_release.cmd as follows:
where %SOLUTION_CFG% is a compiled solution config - Debug, MinSizeRel, Release or RelWithDebInfo (Release by default), %PLUGINS_LIST% is a nesessary plugins list file (plugins_list.txt by default), %TARGET_DIR% is a target dir where to copy all files needed to run the application (default - "X:\Marble\%SOLUTION_CFG%" folder, where X - drive where %WORKSRC% is located). For example:
12. That's all. If you want to debug Marble with plugins from Visual Studio, you have to do some more things: a) in the source file QtMainWindow.cpp, function MainWindow::MainWindow() add the following line before creating instance of ControlView (or directly at the beginning of the function):
b) after each build run make_release.cmd debug plugins_list.txt "%WORKBLD%\src\Debug" (replace %WORKBLD% with your build dir, see above). Good luck! Please tell if something wrong. |
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]