Martin Koller kollix at aon.at
Fri Jan 1 14:45:45 GMT 2016

Trying to port cervisia to KF5, I struggle with above.

kf5_add_kdeinit_executable(cvsaskpass cvsaskpass.cpp)

always gives linker errors:
CMakeFiles/cvsaskpass.dir/cvsaskpass_dummy.cpp.o: In function `kdeinitmain':
cvsaskpass_dummy.cpp:(.text+0x1c): undefined reference to `kdemain'
CMakeFiles/cvsaskpass.dir/cvsaskpass_dummy.cpp.o: In function `main':
cvsaskpass_dummy.cpp:(.text+0x3e): undefined reference to `kdemain'

checking the cmake macro in /usr/lib64/cmake/KF5Init/KF5InitMacros.cmake, I wonder why 
is this even there:
    add_executable(${_target_NAME} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp ${_resourcefile})

and if it's needed, then why does it not add ${_SRCS} directly, since by default
the visbility of symbols is set to hidden, so this
    target_link_libraries(${_target_NAME} kdeinit_${_target_NAME})
can't work.
cvsaskpass.cpp contains:
extern "C" int kdemain(int argc, char** argv)...

What am I missing ?

Best regards/Schöne Grüße

A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?

()  ascii ribbon campaign - against html e-mail 
/\                        - against proprietary attachments

Geschenkideen, Accessoires, Seifen, Kulinarisches: www.lillehus.at

More information about the kde-core-devel mailing list