This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Can't build marble using make

Tags: None
(comma "," separated)
JonnyJP
Registered Member
Posts
1
Karma
0

Can't build marble using make

Thu Jan 28, 2010 4:13 pm
I'm trying to build Marble so I can use the Marble Widget in a Qt application I'm writing and am using the tutorial here:

http://edu.kde.org/marble/obtain.php

The cmake step seems to be fine but make returns the usual 'is not recognised as an internal or external command...'

I've got Visual Studio 2005 so tried running nmake in the Visual Studio command prompt but that doesn't work either as it moans about not having makefiles.

I tried using qmake but that doesn't work either.

Any help is appreciated

Cheers

JP
User avatar
SaroEngels
KDE Developer
Posts
49
Karma
0
OS

Re: Can't build marble using make

Fri Jan 29, 2010 11:51 am
Ok, the differences for Windows Visual Studio are only subtle and it seems you just missed one of them ;)

Ok, expecting you have the sources checked out and made a build directory (this is completely the same as on Linux), you must make sure two things:
first open the visual studio command prompt and make sure you have added qmake from your Qt installation to your path. Make also sure that your Qt is build with Visual Studio as well, because you can't mix with the one build with MinGW (which is currently used for the QtCreator/Qt SDK e.g.).
After that you can run
Code: Select all
cmake -DQTONLY=ON ../marble -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:/marble/install
. Normally appending the -G option shouldn't be needed anymore if you're inside the Visual Studio command prompt.
CMake will finish with the three lines
Code: Select all
-- Configuring done
-- Generating done
-- Build files have been written to: C:/your/directory/here/marble-build

If not, something went wrong, and the output of the CMake run is needed to find the error.
If it works this way, a Makefile should exist in your build directory and you should be able to run
Code: Select all
nmake && nmake install
. This will build marble and install it into the directory you added above with the option
Code: Select all
CMAKE_INSTALL_PREFIX
.
This approach is not specific to Marble, but is usable for all CMake based projects.


SaroEngels, proud to be a member of KDE forums since 2008-Oct.
goodz
Registered Member
Posts
2
Karma
0
OS

Re: Can't build marble using make

Tue Mar 02, 2010 11:06 pm
Same as JP I am trying to implement Marble as a QT widget; however SaroEngels, you mentioned in your helpful post that if using QT SDK I need to build differently because of MinGW.

How would you recommend going about doing this?

Cheers,
-Goodz
jsnewman
Registered Member
Posts
1
Karma
0

Re: Can't build marble using make

Wed Mar 17, 2010 2:41 am
Saro -

I followed your instructions and keep hitting a roadblock at "Linking CXX shared library marblewidgetd.dll" during the nmake

The full error message is below. Any ideas?

Many Thanks
-Scott


OnfRunner.cpp
[ 85%] Building CXX object src/lib/CMakeFiles/marblewidget.dir/qrc_libmarble.obj

qrc_libmarble.cxx
[ 85%] Building CXX object src/lib/CMakeFiles/marblewidget.dir/qrc_marble.obj
qrc_marble.cxx
Linking CXX shared library marblewidgetd.dll
Creating library marblewidgetd.lib and object marblewidgetd.exp
TinyWebBrowser.obj : error LNK2019: unresolved external symbol "__declspec(dllim
port) public: virtual __thiscall QWebView::~QWebView(void)" (__imp_??1QWebView@@
UAE@XZ) referenced in function "public: virtual __thiscall Marble::TinyWebBrowse
r::~TinyWebBrowser(void)" (??1TinyWebBrowser@Marble@@UAE@XZ)
TinyWebBrowser.obj : error LNK2019: unresolved external symbol "__declspec(dllim
port) public: void __thiscall QWebPage::setLinkDelegationPolicy(enum QWebPage::L
inkDelegationPolicy)" (__imp_?setLinkDelegationPolicy@QWebPage@@QAEXW4LinkDelega
tionPolicy@1@@Z) referenced in function "public: __thiscall Marble::TinyWebBrows
er::TinyWebBrowser(class QWidget *)" (??0TinyWebBrowser@Marble@@QAE@PAVQWidget@@
@Z)
TinyWebBrowser.obj : error LNK2019: unresolved external symbol "__declspec(dllim
port) public: class QWebPage * __thiscall QWebView::page(void)const " (__imp_?pa
ge@QWebView@@QBEPAVQWebPage@@XZ) referenced in function "public: __thiscall Marb
le::TinyWebBrowser::TinyWebBrowser(class QWidget *)" (??0TinyWebBrowser@Marble@@
QAE@PAVQWidget@@@Z)
TinyWebBrowser.obj : error LNK2019: unresolved external symbol "__declspec(dllim
port) public: __thiscall QWebView::QWebView(class QWidget *)" (__imp_??0QWebView
@@QAE@PAVQWidget@@@Z) referenced in function "public: __thiscall Marble::TinyWeb
Browser::TinyWebBrowser(class QWidget *)" (??0TinyWebBrowser@Marble@@QAE@PAVQWid
get@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "public: virtual
bool __thiscall QWebView::event(class QEvent *)" (?event@QWebView@@UAE_NPAVQEven
t@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "public: virtual
class QSize __thiscall QWebView::sizeHint(void)const " (?sizeHint@QWebView@@UBE?
AVQSize@@XZ)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::mousePressEvent(class QMouseEvent *)" (?mousePressE
vent@QWebView@@MAEXPAVQMouseEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::mouseReleaseEvent(class QMouseEvent *)" (?mouseRele
aseEvent@QWebView@@MAEXPAVQMouseEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::mouseDoubleClickEvent(class QMouseEvent *)" (?mouse
DoubleClickEvent@QWebView@@MAEXPAVQMouseEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEve
nt@QWebView@@MAEXPAVQMouseEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::wheelEvent(class QWheelEvent *)" (?wheelEvent@QWebV
iew@@MAEXPAVQWheelEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::keyPressEvent(class QKeyEvent *)" (?keyPressEvent@Q
WebView@@MAEXPAVQKeyEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::keyReleaseEvent(class QKeyEvent *)" (?keyReleaseEve
nt@QWebView@@MAEXPAVQKeyEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::focusInEvent(class QFocusEvent *)" (?focusInEvent@Q
WebView@@MAEXPAVQFocusEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::focusOutEvent(class QFocusEvent *)" (?focusOutEvent
@QWebView@@MAEXPAVQFocusEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::paintEvent(class QPaintEvent *)" (?paintEvent@QWebV
iew@@MAEXPAVQPaintEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::resizeEvent(class QResizeEvent *)" (?resizeEvent@QW
ebView@@MAEXPAVQResizeEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::contextMenuEvent(class QContextMenuEvent *)" (?cont
extMenuEvent@QWebView@@MAEXPAVQContextMenuEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::dragEnterEvent(class QDragEnterEvent *)" (?dragEnte
rEvent@QWebView@@MAEXPAVQDragEnterEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::dragMoveEvent(class QDragMoveEvent *)" (?dragMoveEv
ent@QWebView@@MAEXPAVQDragMoveEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::dragLeaveEvent(class QDragLeaveEvent *)" (?dragLeav
eEvent@QWebView@@MAEXPAVQDragLeaveEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::dropEvent(class QDropEvent *)" (?dropEvent@QWebView
@@MAEXPAVQDropEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::changeEvent(class QEvent *)" (?changeEvent@QWebView
@@MAEXPAVQEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al void __thiscall QWebView::inputMethodEvent(class QInputMethodEvent *)" (?inpu
tMethodEvent@QWebView@@MAEXPAVQInputMethodEvent@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "public: virtual
class QVariant __thiscall QWebView::inputMethodQuery(enum Qt::InputMethodQuery)c
onst " (?inputMethodQuery@QWebView@@UBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al bool __thiscall QWebView::focusNextPrevChild(bool)" (?focusNextPrevChild@QWeb
View@@MAE_N_N@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "protected: virtu
al class QWebView * __thiscall QWebView::createWindow(enum QWebPage::WebWindowTy
pe)" (?createWindow@QWebView@@MAEPAV1@W4WebWindowType@QWebPage@@@Z)
TinyWebBrowser.obj : error LNK2019: unresolved external symbol "__declspec(dllim
port) public: void __thiscall QWebView::load(class QUrl const &)" (__imp_?load@Q
WebView@@QAEXABVQUrl@@@Z) referenced in function "public: void __thiscall Marble
::TinyWebBrowser::setSource(class QString const &)" (?setSource@TinyWebBrowser@M
arble@@QAEXABVQString@@@Z)
TinyWebBrowser.obj : error LNK2019: unresolved external symbol "__declspec(dllim
port) public: void __thiscall QWebView::print(class QPrinter *)const " (__imp_?p
rint@QWebView@@QBEXPAVQPrinter@@@Z) referenced in function "public: void __thisc
all Marble::TinyWebBrowser::print(void)" (?print@TinyWebBrowser@Marble@@QAEXXZ)
TinyWebBrowser.obj : error LNK2019: unresolved external symbol "__declspec(dllim
port) public: virtual void * __thiscall QWebView::qt_metacast(char const *)" (__
imp_?qt_metacast@QWebView@@UAEPAXPBD@Z) referenced in function "public: virtual
void * __thiscall Marble::TinyWebBrowser::qt_metacast(char const *)" (?qt_metaca
st@TinyWebBrowser@Marble@@UAEPAXPBD@Z)
TinyWebBrowser.obj : error LNK2019: unresolved external symbol "__declspec(dllim
port) public: virtual int __thiscall QWebView::qt_metacall(enum QMetaObject::Cal
l,int,void * *)" (__imp_?qt_metacall@QWebView@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
referenced in function "public: virtual int __thiscall Marble::TinyWebBrowser::
qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@TinyWebBrowser@M
arble@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
TinyWebBrowser.obj : error LNK2001: unresolved external symbol "__declspec(dllim
port) public: static struct QMetaObject const QWebView::staticMetaObject" (__imp
_?staticMetaObject@QWebView@@2UQMetaObject@@B)
marblewidgetd.dll : fatal error LNK1120: 32 unresolved externals
LINK Pass 1 failed. with 1120
NMAKE : fatal error U1077: '"C:\Program Files\CMake 2.6\bin\cmake.exe"' : return
code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\nmake.exe"' : return code '0x2'
Stop.

C:\Qt\marble\marble-build>


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]