Can't resolve includes after IDE restarts. [message #1840742] |
Fri, 23 April 2021 08:35 |
Ganindu Nanayakkara Messages: 1 Registered: April 2021 |
Junior Member |
|
|
I created a new CMake project in eclipse with the hello world template, built within eclipse, ran indexer (everything worked fine) and then.
Synopsis
- Deleted everything except ".project" and ".cproject"
- Pasted my perfectly working project from elsewhere with "src", "include", "CMakeLists.txt", etc.
- ran build within eclipse, did indexing and everything worked fine.
- restarted eclipse
- Nothing works, red squiggly lines below correct syntax and doesn't builds
Reason
Eclipse creates a sub directory called default inside build and somehow holds that in memory which give the illusion of working when I ran the second build and indexing with my augmented workspace/projectspace
Solution
add a 'default' directory inside the 'build' directory
Implement
Near the top of the "CMakeLists.txt" add the following line
file(MAKE_DIRECTORY build/default)
My eclipse information (can be found in help -> About Eclipse IDE)
Eclipse IDE for C/C++ Developers (includes Incubating components)
Version: 2021-03 (4.19.0)
Build id: 20210312-0638
OS: Linux, v.5.4.0-72-generic, x86_64 / gtk 3.22.30
Java version: 11.0.10
Cheers,
Ganindu.
|
|
|
Powered by
FUDForum. Page generated in 0.02472 seconds