New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#includes do not work in CLion with cpp files but work fine with h files within same lib/ directory #1345

Closed
BryceBeagle opened this Issue Feb 8, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@BryceBeagle

BryceBeagle commented Feb 8, 2018

Configuration

Operating system:
Arch Linux

PlatformIO Version (platformio --version):
PlatformIO, version 3.5.1

Description of problem

.cpp files within the lib/ dir are not correctly recognized for builtin PlatformIO libraries (eg. the Arduino ones). Linting works fine within the same .h files within the same directory. Program builds correctly even though CLion doesn't think it should.

Steps to Reproduce

  1. Create library within lib directory
  2. Attempt #include <Arduino.h> within a .cpp file and within a .h file

Actual Results

image
.h/.hpp files can find Arduino.h

image
.cpp files can find Arduino.h

Note that these two files are next to each other in the same directory

Expected Results

Both should be able to #include the Arduino.h file

@BryceBeagle BryceBeagle changed the title from #includes do not work in CLion with cpp files but work fine with h files within lib/ directory to #includes do not work in CLion with cpp files but work fine with h files within same lib/ directory Feb 8, 2018

@ivankravets

This comment has been minimized.

Member

ivankravets commented Feb 13, 2018

Please re-test with the latest PIO Core and re-init project:

pio upgrade --dev
pio init
@BryceBeagle

This comment has been minimized.

BryceBeagle commented Feb 13, 2018

Issue resolved. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment