How do I add an existing C++ sSource file to a CLion Project
I created a simple cmake project in Clion. I need to add existing source files from another directory. How do I do that ???
The project table only allows we to add a new source ( and it updates CMakeFile.txt ). Also why does it add the header files to the source list ??
Please sign in to leave a comment.
This'll work for that.
could you describe how you add it to SOURCE_FILES...
Are you trying to do an out of source build for some dependency?
Please see the attached image, I am trying to add an existing file to this project called "intro"
In that case just drop it in the folder and add it to SOURCE_FILES.
once i added mingw path, i got it working
Hi everybody. I am new to CLion. I have C files and folders in place however the IDE compiles only 'main.c' and ignores the other source files.
The English verb "add" seems to be missing in the CLion documentation - so can't add files to project...
That sounds like trivial question but: how to build a C project from more than one C file?
Hello CLion NewB!
>I have C files and folders in place however the IDE compiles only 'main.c' and ignores the other source files.
Do you need to compile those source files as separate executables? Or should all the files be included into one executable?