I have the following problem: I try to start coding C++ for a little project in my company. Therefore I received a precoded program. Since I am new to C++ i thought about using a IDE, CLion in my case. The precoded program was build with vim at the console (I don't know if this is the reason for the following, I guess building/linking, problem)
My folder/file structure looks like this:
src
|_subprogramA
|_src
|_main.hpp
|_main.cpp
|_ ...
|_subprogramB
|_ ..
|_src
|_...
...
|_libhttp
|_src
|_http.hpp
|_http.cpp
|_ ..
CMakeList.txt
In my CMakeList.txt, the paths to all .cpp and .hpp files are set by set(Source_Files ) add_executables(projectname ${SOURCE_FILES})
When i build subprogramA, i get the errormessage: fatal error: http/http.hpp: No such file or directory. It is included by #include . Why does the compiler not find the http.hpp file in libhttp/src/http although it is specified in CMakeList? Is there a way to tell it where it is located except changing the "include" to the full path: #include libhttp/src/http.hpp or #include ../../lib.. and so on? (I do not wanna change this codepath since it is used by other persons in another company) I wounder that i can run the tool via console but i cant build it with clion IDE. Best regards, I am happy for every help. And sorry if the question is kinda stupid but starting c++ with a kinda big precoded tool without IDE seems to be impossible for me ^^
Frank :)