Problems building dcopserver on windows/msvc2005

Michael Biebl mbiebl at gmail.com
Sun Mar 19 10:31:15 CET 2006


Hi all,

when compiling trunk/KDE/kdelibs on windows with cmake/nmake/msvc2005
the build fails with this error message:

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Scanning dependencies of target dcopserver
Building CXX object dcop/CMakeFiles/dcopserver.dir/dcopserver.obj
dcopserver.cpp
Building CXX object dcop/CMakeFiles/dcopserver.dir/dcopsignals.obj
dcopsignals.cpp
Linking CXX executable ..\bin\dcopserver.exe
   Creating library ..\bin\dcopserver.lib and object ..\bin\dcopserver.exp
dcopserver.obj : error LNK2019: unresolved external symbol "public: static struc
t QMetaObject const DCOPClient::staticMetaObject" (?staticMetaObject at DCOPClient@
@2UQMetaObject@@B) referenced in function "public: static class QString __cdecl
DCOPClient::tr(char const *,char const *)" (?tr at DCOPClient@@SA?AVQString@@PBD0 at Z
)
dcopserver.obj : error LNK2019: unresolved external symbol __kde_IceIOErrorHandl
er referenced in function "unsigned long __cdecl writeIceData(struct _IceConn *,
unsigned long,char const *)" (?writeIceData@@YAKPAU_IceConn@@KPBD at Z)
dcopserver.obj : error LNK2019: unresolved external symbol __kde_IceWriteHandler
 referenced in function "public: __thiscall DCOPServer::DCOPServer(bool)" (??0DC
OPServer@@QAE at _N@Z)
dcopserver.obj : error LNK2019: unresolved external symbol __kde_IceLastMajorOpc
ode referenced in function "public: __thiscall DCOPServer::DCOPServer(bool)" (??
0DCOPServer@@QAE at _N@Z)
MSVCRT.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referen
ced in function ___tmainCRTStartup
..\bin\dcopserver.exe : fatal error LNK1120: 5 unresolved externals
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~3\VC\bin\cl.exe' : return code '0
x2'
Stop.
NMAKE : fatal error U1077: '"C:\Programme\Microsoft Visual Studio 8\VC\BIN\nmake
.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Programme\Microsoft Visual Studio 8\VC\BIN\nmake
.exe"' : return code '0x2'
Stop.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Looking at the CMakeLists.txt file in kdelibs/dcop I think that I
should correctly read:
===================================================================
--- CMakeLists.txt      (revision 520152)
+++ CMakeLists.txt      (working copy)
@@ -111,7 +111,7 @@

 kde4_automoc(${dcopserver_KDEINIT_SRCS})

-kde4_add_kdeinit_executable( dcopserver ${dcopserver_KDEINIT_SRCS})
+kde4_add_kdeinit_executable(kdeinit_dcopserver ${dcopserver_KDEINIT_SRCS})

 target_link_libraries(kdeinit_dcopserver  ${QT_QTCORE_LIBRARY} DCOP
${KDEWIN32_LIBRARIES})

But if I make this change, cmake complains:
CMake Error: Attempt to add link library "kdeinit_dcopserver" to
target "dcopserver" which is not built by this project.

Can anyone explain what is going wrong here? All other modules of
kdelibs build just fine.

Cheers,
Michael

P.S.:
Wouldn't it make sense to include the cmake directory (or at least
parts of it) as external reference? E.g. changes to
cmake/modules/KDE4Macros.cmake would then be available to all kde
packages (kdelibs/kdebase/...).
P.P.S:
Is there a list which packages have already been "cmakeified" and
where work is still needed?


More information about the Kde-buildsystem mailing list