fix linking of kdecore

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Sun Oct 22 15:05:46 CEST 2006


Sebastian Sauer schrieb:
> Hi,
> 
> and hours after hours of testing I would suggest following change in 
> kdelibs\cmake\modules\FindKDEWIN32.cmake
> 
> - # add the winsock2 library
> - #find_library(WIN32_LIBC_LIBRARY NAMES msvcrt PATHS $ENV{WINDIR}/system32)
> - #find_library(WIN32_USER32_LIBRARY NAMES user32 PATHS $ENV{WINDIR}/system32)
> - #find_library(WIN32_SHELL32_LIBRARY NAMES shell32 PATHS 
> $ENV{WINDIR}/system32)
> - #find_library(WIN32_WS_LIBRARY NAMES wsock32 PATHS $ENV{WINDIR}/system32)
> - #find_library(WIN32_WS2_LIBRARY NAMES ws2_32 PATHS $ENV{WINDIR}/system32)
> - #set(KDEWIN32_LIBRARIES ${KDEWIN32_LIBRARY} ${WIN32_WS_LIBRARY} 
> ${WIN32_LIBC_LIBRARY} ${WIN32_USER32_LIBRARY} ${WIN32_SHELL32_LIBRARY} 
> ${WIN32_WS2_LIBRARY})
> 
> + set(KDEWIN32_LIBRARIES ${KDEWIN32_LIBRARY} msvcrt ws2_32 user32 shell32)
> 
> This fixes two problems.
> 
> 1) KDEWIN32_LIBRARIES is currently undefined while it should be defined at 
> least with something like 
> set(KDEWIN32_LIBRARIES ${KDEWIN32_LIBRARY})
> 
> 2) At least here linking of kdecore fails cause of missing libraries that are 
> at least here not automaticly added. The missing libs are msvcrt which seems 
> to be the libc-solution on Windows and provides basic functionality like e.g. 
> strcpy. Without that lib I keep to get "undefined reference to 'strcpy'" 
> errors on linking. The ws2_32 lib (winsock2) which contains things like 
> gethostbyproto and user32 which has things like getuid. I don't know if 
> shell32 is really needed, but since it was defined there as well before my 
> first commit, I would suggest to have it in there again too.
> 
> p.s. as you may note the above says
> set(KDEWIN32_LIBRARIES ${KDEWIN32_LIBRARY} msvcrt ws2_32 user32 shell32)
> and not
> set(KDEWIN32_LIBRARIES "${KDEWIN32_LIBRARY} msvcrt ws2_32 user32 shell32")
> (with quotes). IIRC is should have quotes and before it breaked for me cause 
> it did not have them. I tried it now on another fresh system and there it 
> compiles even without the quotes. hmmm... So, it can't be a caching-issue 
> what is even more confusing.
> 
> Anyway. Commit? More testing? Feedback! :)
> 
I'm currently compiling with mingw to see what's going wrong there. But
I know for sure that it worked some time ago and that nothing important
was changed to break mingw compile... curious

Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://mail.kde.org/pipermail/kde-windows/attachments/20061022/29dee51b/attachment.pgp 


More information about the Kde-windows mailing list