Hello,
I am trying to make a Poc using Narcoleptic Library in visual studio code.
The problem is that every reference to Narcoleptic keep being undefined.
In my folder for the app, I created a new folder "libraries" containing a folder for each library (containing .h and .cpp)
I updated my c_cpp_properties.json according to that structure:
{
"configurations": [
{
"name": "Win32",
"includePath": [
"C:\Program Files (x86)\Arduino\tools\",
"C:\Program Files (x86)\Arduino\hardware\arduino\avr\",
"D:\ArduinoApp\libraries\DHT\",
"D:\ArduinoApp\libraries\Narcoleptic\",
"C:\Program Files (x86)\Arduino\hardware\**"
],
"forcedInclude": [
"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\Arduino.h",
"D:\ArduinoApp\libraries\DHT\DHT.h",
"D:\ArduinoApp\libraries\Narcoleptic\Narcoleptic.h"
],
"intelliSenseMode": "msvc-x64",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe",
"cStandard": "c11",
"cppStandard": "c++17"
}
],
"version": 4
}
Looks like the code is fine but when I try to upload:
Vérification...
C:\AppData\Local\Temp\cckLU2oh.ltrans0.ltrans.o: In function `setup':
d:\ArduinoApp/PocSleep.ino:53: undefined reference to `Narcoleptic'
d:\ArduinoApp/PocSleep.ino:53: undefined reference to `Narcoleptic'
my include is done like that:
#include"libraries/Narcoleptic/Narcoleptic.h"
The strange point here is that I can include another lib just using:
#include"DHT.h"
But no way to use the same syntax for my Narcoleptic lib
Any idea on where the problem is from?
Thank you