Weird happenings with the latest SVN update

Peter Kümmel syntheticpp at gmx.net
Sat Jan 13 11:10:19 CET 2007


Ralf Habacker wrote:
> Ralf Habacker schrieb:
>> Ryan Loebs schrieb:
>>   
>>> I updated my SVN directory before retrying the win32 build but a new
>>> error started popping up.  The fix is easy but I don't know if it'll
>>> prevent me from running the app....
>>>
>>> CMake generates NMake Makefiles that specify /subsystem:windows but
>>> since the kapps dont have WinMain it raises a linker error claiming
>>> that function is missing (which is true) so whenever I hit that error
>>> i go and change the CMake file to be /subsystem:console.  Is this
>>> supposed to be the case or has something gone awry?
>>>
>>>   
>>>     
>> There was a change in the cmake build system, which seems to break to 
>> much. A temporay solutions is:
>>
>> in kdelibs/cmake/modules  see the macro (KDE4_ADD_EXECUTABLE _target_NAME)
>>
>> and comment out the following the set line
>>
>>    # for GUI apps, this disables the additional console under Windows
>>    if (WIN32)
>> #      set(_add_executable_param WIN32)
>>    endif (WIN32)
>>
>> and relink executables
>>   
> The real solution is to add qtmain to the link list,which contains the
> WinMain symbol
> Christian, do you have any idea how to add  this library to kde's
> buildsystem, when using win32 mode ?
> 
> Ralf

It should work already, see ${QT_QTMAIN_LIBRARIES}:


macro (KDE4_ADD_KDEINIT_EXECUTABLE)
...
   kde4_add_executable(${_target_NAME} "${_nogui}" "${_uninst}" ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp)
   target_link_libraries(${_target_NAME} kdeinit_${_target_NAME})

   if (WIN32)
      target_link_libraries(${_target_NAME} ${QT_QTMAIN_LIBRARIES})
   endif (WIN32)

endmacro (KDE4_ADD_KDEINIT_EXECUTABLE)


Peter



More information about the Kde-windows mailing list