Reputation: 450
I am trying to compile a code. I have the following Structure
RLW/RLW.c (inside a folder)
RLW/RLW.h
main.c
In the main.c if I have the following line
#include "RLW.h"
It does NOT COMPILE and the line has the error RLW.h no such file or directory
if I put the following line in main.c
#include "RLW/RLW.h"
The code COMPILES but there is still the error RLW.h no such file or directory
.
I have added the path to the RLW Folder in
Properties->C/C++ General -> Paths and Symbols -> Includes -> GNU C
Any help on how to fix the error?
Upvotes: 0
Views: 59
Reputation: 492
You have mentioned that inside folder RLW, RLW.h file is available. main.c
is present in current working directory(CWD). So to include the folders present in CWD you need to give path as "./folder/xyz.c"
.Hence giving the include line as #include "./RLW/RLW.h"
will solve your problem
Upvotes: 1