linking errors. Hellow. I have a project with eight .c and eight .h files. How should i write CMakeLists.txt to solve include dependences for all of them? Creating libraries isn't the way, because every file depends on some others. Thank you!
My CMakeLists.txt was like
cmake_minimum_required(VERSION 2.8)
project(calc-2.4.0)
set(SOURCE_EXE main.c expmath.c interface.c container.c
polnot.c error.c getelem.c dbg.c
buildctrl.h expmath.h interface.h container.h
polnot.h error.h getelem.h dbg.h)
add_definitions(-Wall -O2)
add_executable(calc ${SOURCE_EXE})
and
cmake_minimum_required(VERSION 2.8)
project(calc-2.4.0)
set(SOURCE_EXE main.c expmath.c interface.c container.c
polnot.c error.c getelem.c dbg.c)
add_definitions(-Wall -O2)
add_executable(calc ${SOURCE_EXE})
So linter can't see definitions anyway.
calcprogram..in your include paths list in your configuration page (or in a.gcc-flags.jsonfile—see the File/Project-Specific Settings section of the linter-gcc docs)?