I decided to make C ++ - Qt-GUI for a C program (both languages ββthat I donβt know) using KDevelop, which in turn uses CMake.
The C source does not have a header, so I created it, and some structures were transferred to it, as well as the declaration of the only function in the C source that I need to call.
The problem is that I cannot call it because either CMake does not find the C file (and therefore the definition), or when I add the C source to my source code installed in CMakeLists.txt, it complains that both my main.cpp and the C source file have basic functions.
How to tell CMake that it should only make the function from the C file available, which I declared in the header?
here he is:
project(oregengui) cmake_minimum_required(VERSION 2.6) find_package(Qt4 REQUIRED) include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}) set(oregengui_SRCS oregengui.cpp main.cpp qrangeslider/qrangeslider.cpp) #as soon as i add oregengui/oregengui.c, it won't work because of the main function qt4_automoc(${oregengui_SRCS}) add_executable(oregengui ${oregengui_SRCS}) target_link_libraries(oregengui ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
PS: I do not want to change the source of C too much, since this is an independent project. I guess the developer will accept the introduction of the header, but not much more.
source share