KDE/kdelibs

Michael Drüing michael at drueing.de
Tue Feb 7 23:10:53 CET 2006


Hi,

after this patch I can successfully compile some parts of kdelibs. 
What works:
 - kdewin32.{dll,lib}
 - kdefx.{dll,lib}
 - kdeinit_dcopserver.{dll,lib}
 - dcop.{dll,lib}
 - dcop*.exe

What doesn't work:

Compilation unexpectedly stops for me on kdecore/kglobalsettings.cpp, in
this part of the file:

#ifdef Q_WS_WIN
#include <windows.h>
#include "qt_windows.h"
#include <win32_utils.h>
static QRgb qt_colorref2qrgb(COLORREF col)
{
    return qRgb(GetRValue(col),GetGValue(col),GetBValue(col));
}
#endif

...the error is "GetRValue : unknown identifier" (same with GetGValue and
GetBValue), which is weird because these macros are defined in wingdi.h
(included by windows.h).
However, it could just be my system config, so I hacked around that by
copying the #defines into the cpp file itself:
#ifdef Q_WS_WIN
#include <windows.h>
#include "qt_windows.h"
#include <win32_utils.h>
#define GetRValue(rgb)      (LOBYTE(rgb))
#define GetGValue(rgb)      (LOBYTE(((WORD)(rgb)) >> 8))
#define GetBValue(rgb)      (LOBYTE((rgb)>>16))
static QRgb qt_colorref2qrgb(COLORREF col)
{
    return qRgb(GetRValue(col),GetGValue(col),GetBValue(col));
}
#endif
 
after that, all kdecore files compile fine. However, they do not link:

kprocess.obj : error LNK2019: unresolved external symbol __imp__setenv
referenced in function "protected: void __thiscall
KProcess::setupEnvironment(void)" (?setupEnvironment at KProcess@@IAEXXZ)
kcatalog.obj : error LNK2001: unresolved external symbol __imp__setenv
ktimezones.obj : error LNK2001: unresolved external symbol __imp__setenv
ktimezones.obj : error LNK2019: unresolved external symbol __imp__unsetenv
referenced in function "public: virtual int __thiscall
KSystemTimezone::offset(__int64)const " (?offset at KSystemTimezone@@UBEH_J at Z)
..\bin\kdecore.dll : fatal error LNK1120: 2 unresolved externals

...setenv and unsetenv don't seem to be part of any win32-library, neither
kdewin32, nor any MSVC library (MSDN doesn't have an entry for {un}setenv
either)

--Michael

> -----Original Message-----
> From: Alexander Neundorf [mailto:neundorf at kde.org] 
> Sent: Tuesday, February 07, 2006 9:17 PM
> To: kde-commits at kde.org
> Cc: khtml-cvs at kde.org; bill.hoffman at kitware.com; 
> kde-buildsystem at kde.org
> Subject: KDE/kdelibs
> 
> SVN commit 506872 by neundorf:
> 
> -move the find_package(PCRE) from kdelibs/CMakeLists.txt to 
> kdelibs/kjs/CMakeLists.txt
> -add a check for regex.h in kjs/CMakeLists.txt and error out 
> if neither PCRE nor regex.h have been found
> 
> build kdelibs/win independent from the rest of kdelibs/
> 
> this means
> 1) run cmake on kdelibs/win/
> 2) make kdelibs/win
> 3) install kdelibs/win
> 4) run cmake in kdelibs/ -> point it to the place where 
> kdewin32 has been installed to
> 5) make kdelibs/
> 6) make install
> 
> Peter, can you please check that kdelibs/win/ builds and also 
> installs this way ?
> It might still be possible that somewhere stuff from kdelibs/ 
> is included directly. 
> Also eventually $ENV{MSSDK}/include might have to be added in 
> kdelibs/win/
> 
> ConfigureChecksWin.cmake is not used anymore, we can remove 
> it if it works this way.
> 
> Please check also that kdelibs/ configures correctly again. 
> It is required that the include dir
> of kdewin32 is set. 
> If all the HAVE_FOO_PROTO checks still fail, please post the 
> error messages from CMakeError.log
> 
> Alex
> 
> CCMAIL: kde-buildsystem at kde.org
> CCMAIL: syntheticpp at gmx.net
> CCMAIL: bill.hoffman at kitware.com
> 
> 
> 
>  M  +5 -11     CMakeLists.txt  
>  M  +2 -29     ConfigureChecks.cmake  
>  M  +46 -17    cmake/modules/FindKDE4.cmake  
>  M  +6 -0      cmake/modules/MacroOptionalFindPackage.cmake  
>  M  +7 -0      kjs/CMakeLists.txt  
>  M  +29 -28    win/CMakeLists.txt  
> 
> 
> _______________________________________________
> Kde-buildsystem mailing list
> Kde-buildsystem at kde.org
> https://mail.kde.org/mailman/listinfo/kde-buildsystem
> 



More information about the Kde-buildsystem mailing list