Skip to content

No such file or directory when compiling with PlatformIO and VsCode #76

@berickson

Description

@berickson

Is there an existing issue for this bug?

  • I have searched the issues and there is no existing issue for this bug.

What development environment are you using?

PlatformIO

What board are you using?

Teensy 4.0

What part of CRSF for Arduino is this bug related to?

Build/Compile/Upload

Current behaviour

Compiling fails with "No such file or directory". This looks very similar to #19, but now the issue is with PlatformIO / VsCode and not the Arduino IDE.

   35 | #include "SerialReceiver/CRC/CRC.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/blue/lib87d/CRSFforArduino/CRSFforArduino/src/CRSFforArduino.cpp.o] Error 1
.pio/libdeps/blue/CRSFforArduino/src/CRSFforArduino/src/Hardware/CompatibilityTable/CompatibilityTable.cpp:30:10: fatal error: ./CFA_Config.hpp: No such file or directory
   30 | #include "./CFA_Config.hpp"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/blue/lib87d/CRSFforArduino/CRSFforArduino/src/Hardware/CompatibilityTable/CompatibilityTable.cpp.o] Error 1

Expected behaviour

No compiler errors.

Steps to reproduce

Using VsCode with a PlatformIO project, Add https://github.com/ZZ-Cat/CRSFforArduino to lib_deps in platformio.ini. Compile.

Additional information

I was able to "fix" the behavior for myself by creating a fork of the project at https://github.com/berickson/CRSFforArduinoFork where I #undef PLATFORMIO in several CPP files forcing it to use the same include paths that are used for Arduino. If I reference that repo from my platformio.ini libdeps, things compile fine.

Metadata

Metadata

Assignees

Labels

...in progress 🚧Development on this is in progressCompiler 💻This happens during compiling/building/verifyingPlatformIO 👽This is specific to PlatformIO.↩️ Regression ↩️A recursive bug that has survived one or more previous releases.🐞 Bug 🐞OH DEAR!!! You seem to have spotted a bug!👍 Good first-time contributionWelcome to the club. This is how we roll, around here.🚨 Blocks Release 🚨No release is to be made, until this is resolved.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions