PDA

View Full Version : Error building QtMobility



Kwakkie
10th May 2012, 16:15
Hello all

I try to build QtMobility 1.2.0 on windows, but it fails. I have Qt 4.8.0 compiled and installed and I'm able to create projects using Qt Creator and Visual Studio 2010

Steps I did:
Download the sources from the Qt website
Unpacked in a folder
Opened a visual studio command line
Configure
nmake

I get the following error in the nmake:


C:\Qt\QtMobility>nmake

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

cd src\ && "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\n
make.exe" -f Makefile

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

cd global\ && "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe" -f Makefile

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

cd serviceframework\ && "c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\BIN\nmake.exe" -f Makefile

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" -
f Makefile.Debug all

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189
-DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_SHARED -DQTM_PLUGIN_PATH=\"C:/QtM
obility/plugins\" -DQT_BUILD_SFW_LIB -DQT_MAKEDLL -DQT_DLL -DQT_SQL_LIB -DQT_NET
WORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMX
EXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\Qt\4.8.0x64\include\QtCore" -I"c:\Q
t\4.8.0x64\include\QtNetwork" -I"c:\Qt\4.8.0x64\include\QtSql" -I"c:\Qt\4.8.0x64
\include" -I"..\global" -I"ipc" -I"." -I"c:\Qt\4.8.0x64\include\ActiveQt" -I"..\
..\build\Debug\QtServiceFramework\moc" -I"c:\Qt\4.8.0x64\mkspecs\default" -Fo..\
..\build\Debug\QtServiceFramework\ @C:\Users\wdh\AppData\Local\Temp\nm2B4C.tmp
qmetaobjectbuilder.cpp
ipc\qmetaobjectbuilder.cpp(803) : error C2664: 'QtMobility::QMetaObjectBuilder::
setStaticMetacallFunction' : cannot convert parameter 1 from 'const QMetaObjectE
xtraData::StaticMetacallFunction' to 'QtMobility::QMetaObjectBuilder::StaticMeta
callFunction'
This conversion requires a reinterpret_cast, a C-style cast or function-
style cast
ipc\qmetaobjectbuilder.cpp(1430) : error C2440: '=' : cannot convert from 'QtMob
ility::QMetaObjectBuilder::StaticMetacallFunction' to 'QMetaObjectExtraData::Sta
ticMetacallFunction'
This conversion requires a reinterpret_cast, a C-style cast or function-
style cast
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

C:\Qt\QtMobility>

Any ideas?

mentalmushroom
11th May 2012, 10:21
I am using Qt Mobility along with Visual Studio 2008 + Qt 4.7.2. Unfortunately I don't remember exactly how to build it, but I remember you need to install Perl for that.

Kwakkie
13th May 2012, 18:08
I believe you need perl for Qt as well. I have perl installed and Qt compiled fine. Anyway, the error doesn't look like it's perl related. It looks like a QMobility namespace issue which suggests some problems in code, declaration or package setup. Either way, it looks like a general problem.