0
我正在嘗試構建自己的KDevelop插件。我可以CMake並建立一個Makefile,但是當我運行make時,我得到了很多與它相關的錯誤,沒有從Qt中找到任何東西,比如「QString沒有指定類型。是否需要爲我的KDE插件添加內容?使用Qt構建運行CMake後Qt和Kde4運行make
錯誤:
/usr/include/KDE/../kurl.h:27:27: error: QtCore/QVariant: No such file or directory
/usr/include/KDE/../kurl.h:28:23: error: QtCore/QUrl: No such file or directory
In file included from /usr/include/kconfig.h:27,
from /usr/include/ksharedconfig.h:25,
from /usr/include/KDE/../kcomponentdata.h:23,
from /usr/include/KDE/KComponentData:1,
from /usr/include/vcs/dvcs/dvcsplugin.h:26,
from /home/charlesj/devKDevelopPlugin/CSCMKPlugin.h:8,
from /home/charlesj/devKDevelopPlugin/moc_KPlugin.cpp:10,
,還有更多類似這樣的關於QGlobal的QObject等
,這裏是我的CMakeListst.txt
project(kdev)
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
########### next target ###############
set(kdev_PART_SRCS
KPlugin.cpp
)
kde4_add_plugin(kdev ${kdev_PART_SRCS})
target_link_libraries(kdev ${KDE4_KIO_LIBS}
${KDE4_KPARTS_LIBS}
kdevplatformutil
kdevplatforminterfaces
kdevplatformvcs
kdevplatformproject
kdevplatformlanguage
)
install(TARGETS kdev DESTINATION ${PLUGIN_INSTALL_DIR})
########### install files ###############
install(FILES kdev.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES kdev.rc DESTINATION ${DATA_INSTALL_DIR}/kdev)
這只是一個試圖讓KDevelop加載我的插件的框架程序。 再次感謝。
你可以複製的錯誤信息和你的`CMakelists.txt`,請。 – tibur 2011-02-02 18:52:02