11-14-2017 05:00 AM - edited 11-14-2017 05:02 AM
What is correct way to do when new folder with source is created and added to application project so I won't see compilation errors such "No such file or directory" "Undefined reference..."etc?
I'm used to from other Eclipse forks (for qt C MinGW, STM32...) that the internal Makefile is updated with modified source tree or I have to do some stuff in Project>Properties>C/C++ Buld>Directories/Libraries/Paths and Symbols
Let's say in SDK I create simple project what have default tree with "src" folder, ldscript.ld and some internal Makefile what I don't see so I don't know what is changed when build settings are modified. Then I create folder "xxx" in "src" folder and create/copy/import some source stuff into it. Then project cannot be compiled without errors. :(
I'm playing with build settings like adding include/source paths to this "xxx" folder but project is even more broken as I get errors with missing stuff from BSP layer.
11-14-2017 01:48 PM
The easiest and safest way to add a new folder:
- right click on the project --> New --> folder
you can then move the folder inside another folder etc
To add new files , same procedure but select source file / header instead fo folder.
Then replace the new files with yours.
You need to do these because what is visible in the folders is not what Elipse is aware of.
11-15-2017 12:14 AM
I tried your way and no success. :(
ofc I can make it work with "#include "some_folder/foo.h". My question is about making these h/c files known across the project so I don't have to specify absolute or relative paths in #include directive.
11-15-2017 02:16 AM
You need to inform the compiler where to find these includes,.
To set the path of these includes:
Right click on the project
expand "C/C++ Build"
"Tool setting" tab
add the paths in there