Hello,
I am compiling a Qt based project using CMake. The target is a static library "myLib.a".
Then when I compile an executable (always using CMake) that uses "myLib.a" I get undefined references:
- On all the signals of moc'ed classes
- On vtables of moc'ed classes
The CMake logs show that the moc_***.cxx files:
- Are generated (I am using the CMake command "qt4_wrap_cpp")
- Are compiled in moc_***.cpp.o
- Are linked to the static library "myLib.a"
What can be wrong? Why aren't Qt stuff recognized?
The relevant section of the CMake for "myLib.a":
Qt Code:
qt4_wrap_cpp(MOCS ${MOC_HDRS}) add_library(myLib ${STATIC_OR_SHARED_FLAG} ${SRCS} ${MOCS}) target_link_libraries(RegattaClientSDK $${QT_LIBRARIES})To copy to clipboard, switch view to plain text mode
Thanks in advance for your help!
Bookmarks