Hi,
I am trying to understand the PlatformIO settings for projects and working on a new project which has external library files (headers & source files) which I have put in the 'lib' directory assuming the main.c file would automatically be able to find the path of these files as long as my include lines where correct. But from several attempts at doing this the program fails to compile and refuses to find the library files? I have included a screenshot am I doing something wrong?
How to add lib files
- stevenbennett
- Posts: 34
- Joined: Sun May 19, 2024 7:30 am
- Location: High Bentham, UK
Re: How to add lib files
I assume you have run BUILD and restarted VSCode? The red squiggles often disappear then. Also tft.h and tftspi.h are in the folder tft so perhaps you don't need to specify the folder, could you try just #include "tft.h" and #include "tftspi.h".
Re: How to add lib files
Hi, I managed to get it too work by using #include <included.h> format which auto lists all the header files.
- stevenbennett
- Posts: 34
- Joined: Sun May 19, 2024 7:30 am
- Location: High Bentham, UK
Re: How to add lib files
Good that you got it working. Was the solution to surround the header file names with < > instead of " " ?
Who is online
Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 101 guests