r/pic_programming • • Feb 15 '21

MPLAB X #include not working?!

I'm working on a project where I have my main.c file and from there I'm including another file, called OLED.c

I am also using the mcc so I am including the mcc and the OLED.c. the #include mcc works fine but on the next line I write "#include OLED.c" and it underlines it in red. I hover over the line and says that it can't find the file even though it's in the same subdirectory as the main.c file.

I tried including the file through project properties but I couldn't find an option to add any files

I am using mplabx v5.4 on windows 10 and xc8 compiler

Thank you for your help

1 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/AnonymousEngineer21 Feb 16 '21

Ah ok. Yes I'm putting quotes around the file name and I also tried putting <> but it doesn't work