[Marble-devel] Using MarbleWidget in Visual Studio on Windows

M.Ozeau m.ozeau at gmail.com
Tue Aug 23 12:58:19 UTC 2011


I'm sorry to spam like this but i'm still stuck....


Is there any one who ever use Marble widget on windows with Visual studio ??

2011/8/22 M.Ozeau <m.ozeau at gmail.com>

> Any help plz ?
>
> 2011/8/4 M.Ozeau <m.ozeau at gmail.com>
>
> I finally success to compile Marble With Visual Studio 2008 and Qt 4.7.3 on
>> Windows. (like there
>> http://techbase.kde.org/Projects/Marble/WindowsCompiling)
>>
>> I create a new MakeFile project in Visual Studio. Add a Main.css like in
>> this thread (http://techbase.kde.org/Projects/Marble/MarbleCPlusPlus)
>>
>> #include <QtGui/QApplication>#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("earth/openstreetmap/openstreetmap.dgml");
>>
>>     mapWidget->show();
>>
>>     return app.exec();}
>>
>> I copy past the marble-tmp\include\marble\ directory to my Application
>> directory and the link for the #include <marble\MarbleWidget.h> is OK
>>
>> I copy the MarbleWidget.dll to my Debug directory and my Release Directory
>>
>> But when i try to launch the application i still got some error :
>>
>> Error    2    error C2491: 'Marble::AbstractDataPlugin::staticMetaObject'
>> : definition of dllimport static data member not allowed    c:\Documents and
>> Settings\Administrateur\Mes documents\Visual Studio
>> 2008\Projects\MarbleTest2\MarbleTest2\debug\moc_AbstractDataPlugin.cpp
>> 48    MarbleTest2
>> Error    8    error C2491:
>> 'Marble::AbstractDataPluginItem::staticMetaObject' : definition of dllimport
>> static data member not allowed    c:\Documents and
>> Settings\Administrateur\Mes documents\Visual Studio
>> 2008\Projects\MarbleTest2\MarbleTest2\debug\moc_AbstractDataPluginItem.cpp
>> 44    MarbleTest2
>> .....
>> ....
>> ...
>> ....
>> .....
>> Error    252    error C2491:
>> 'Marble::TileLevelRangeWidget::staticMetaObject' : definition of dllimport
>> static data member not allowed    c:\Documents and
>> Settings\Administrateur\Mes documents\Visual Studio
>> 2008\Projects\MarbleTest2\MarbleTest2\debug\moc_TileLevelRangeWidget.cpp
>> 51    MarbleTest2
>> Error    259    error C2491: 'Marble::TinyWebBrowser::staticMetaObject' :
>> definition of dllimport static data member not allowed    c:\Documents and
>> Settings\Administrateur\Mes documents\Visual Studio
>> 2008\Projects\MarbleTest2\MarbleTest2\debug\moc_TinyWebBrowser.cpp    50
>> MarbleTest2
>> Error    264    fatal error U1077: '"C:\Program Files\Microsoft Visual
>> Studio 9.0\VC\bin\cl.EXE"' : return code '0x2'    NMAKE    MarbleTest2
>> Error    265    fatal error U1077: '"C:\Program Files\Microsoft Visual
>> Studio 9.0\VC\bin\nmake.exe"' : return code '0x2'    NMAKE    MarbleTest2
>> Error    266    error PRJ0019: A tool returned an error code from
>> "Performing Makefile project actions"    MarbleTest2    MarbleTest2
>>
>> Any help please ??
>>
>> Thx a lot
>>
>>
>> --
>> Cordialement Morgan Ozeau
>>
>>
>
>
> --
> Cordialement Morgan Ozeau
>
>


-- 
Cordialement Morgan Ozeau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20110823/02b8fd48/attachment.html>


More information about the Marble-devel mailing list