I'm not sure if this is how its meant to work but it seems wrong.
Really annoying if you trying to build something that uses third party libraries with dependencies.
I have and include folder in my project with the and have added this to the includePath in my c_cpp_properties.json file.
Therefore I expect
but i get...
app.ino:1:18: fatal error: test.h: No such file or directory
#include <test.h>
^
compilation terminated.
Now i can do this.
But that's no good with you have third party libraries expecting #include <> notation expecting the paths to be working.
I have a folder structure
C:.
β app.ino
β
ββββ.vscode
β arduino.json
β c_cpp_properties.json
β
ββββinclude
test.h
c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino",
"${workspaceRoot}\\include",
"${workspaceRoot}"
],
"browse": {
"limitSymbolsToIncludedHeaders": false,
"path": [
"C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino",
"${workspaceRoot}\\include",
"${workspaceRoot}"
]
},
"intelliSenseMode": "msvc-x64"
}
],
"version": 2
}
test.h
class Test
{
public:
void printTest()
{
Serial.print("test");
}
};
and app.ino
#include <test.h>
Test test;
void setup()
{
Serial.begin(9600);
test.printTest();
}
void loop()
{
}
c_cpp_properties.json is the config file of the c/c++ extension. It reads the includePath config to provide correct intellisense. However, the building done using the Arduino IDE, which follows its own rule to resolve third party libraries.
Well then its kind of useless then for and serious integrated solution.
Basically forget this toy and use Atmel Studio(TM).
Unless of course we should fix it so you can.
On Wed, Aug 16, 2017 at 1:39 PM, Zhang Yuning notifications@github.com
wrote:
c_cpp_properties.json is the config file of the c/c++ extension. It reads
the includePath config to provide correct intellisense. However, the
building done using the Arduino IDE, which follows its own rule to resolve
third party libraries.β
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode-arduino/issues/392#issuecomment-322638129,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABoM2r97LBuH7L93PbJA3GvSZ2R78qFwks5sYkhNgaJpZM4O3idV
.
--
Justin Romaine
Senior Systems Architect
Spark Dental Technology
justin.[email protected]
ph 021 764 506
hm 09 445 9166
Duplicate with #438 .
Most helpful comment
Well then its kind of useless then for and serious integrated solution.
Basically forget this toy and use Atmel Studio(TM).
Unless of course we should fix it so you can.
On Wed, Aug 16, 2017 at 1:39 PM, Zhang Yuning notifications@github.com
wrote:
--
Justin Romaine
Senior Systems Architect
Spark Dental Technology
justin.[email protected]
ph 021 764 506
hm 09 445 9166