Description of problem
I can’t compile my program with files in such a localisation:
│ .gitignore
│ .travis.yml
│ LICENSE
│ platformio.ini
│
├───.pioenvs
├───.vscode
│
├───include
│
├───lib
│ definitions.h
│ functions.cpp
│ functions.h
│ global_variables.h
│ initialization.cpp
│ initialization.h
│
└───src
main.cpp
But when I move to include, everything works. Also, when trying to add /lib
to c_cpp_properties.json
that file keeps reseting, after VSCode restart.
Configuration
VS Code: 1.34.0
Home: 2.0.2
Core: 3.6.7
OS: Microsoft Windows [Version 10.0.17763.504]
Error message
While compiling
> Executing task: C:\Users\mateu\.platformio\penv\Scripts\platformio.exe run <
Processing nanoatmega328 (platform: atmelavr; board: nanoatmega328; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/nanoatmega328.html
PLATFORM: Atmel AVR > Arduino Nano ATmega328
HARDWARE: ATMEGA328P 16MHz 2KB RAM (30KB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 5 compatible libraries
Scanning dependencies...
No dependencies
Compiling .pioenvs\nanoatmega328\src\main.cpp.o
Compiling .pioenvs\nanoatmega328\FrameworkArduino\Stream.cpp.o
src\main.cpp:2:25: fatal error: definitions.h: No such file or directory
*********************************************************************
* Looking for definitions.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:definitions.h"
* Web > https://platformio.org/lib/search?query=header:definitions.h
*
*********************************************************************
compilation terminated.
Compiling .pioenvs\nanoatmega328\FrameworkArduino\Tone.cpp.o
Compiling .pioenvs\nanoatmega328\FrameworkArduino\USBCore.cpp.o
*** [.pioenvs\nanoatmega328\src\main.cpp.o] Error 1
================================================================= [ERROR] Took 0.90 seconds =================================================================
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.