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

V3.5.1a7: Qt Creator project has problems in the defines --> linter shows errors #1303

Closed
KarlZeilhofer opened this Issue Jan 21, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@KarlZeilhofer

KarlZeilhofer commented Jan 21, 2018

Configuration

Operating system: Linux Mint 18.1

PlatformIO Version (platformio --version): 3.5.1a7

Description of problem

The issue #1299 is solved now, but there still exist a major problem with the generated project file.

E.g. a line with int x; is marked with syntax errors, with the hint "declaration expected". It seems, the problem is related to all native primitive types (int, char, ...).

Steps to Reproduce

  1. create empty project with platformio init --ide qtcreator --board nanoatmega328
  2. create the file ./src/main.cpp
  3. fill in this code
#include <Arduino.h>

int x=0; // Qt Creators C++ parser reports error here!

void setup()
{
}

void loop()
{
}

Actual Results

Error reported, and as a result, the code below is not indexed any more and therefore the code browsing and autocompletion doesn't work any more.

Expected Results

No errors and the whole project should be indexed by the C++ parser.

Workaround

delete the problematic lines from the .pro file and save it.
I have found out, when commenting all lines out, that end with a space and int solves the problem for integer declarations like int myvariable;.
E.g.: DEFINES += __UINTMAX_TYPE__=long long unsigned int

Additional info

Qt Creator Version: 3.5.1

@ivankravets ivankravets added this to the 3.5.2 milestone Feb 2, 2018

@ivankravets

This comment has been minimized.

Member

ivankravets commented Feb 5, 2018

Please re-test with pio upgrade --dev and pio init

ivankravets added a commit that referenced this issue Mar 13, 2018

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