yasuyuky / autocomplete-clang

https://atom.io/packages/autocomplete-clang
MIT License
112 stars 35 forks source link

the package doesn't find my .clang_complete file! #109

Closed jmscaramal closed 8 years ago

jmscaramal commented 8 years ago

Hello guys...

I just installed the autocomplete-clang and linter-gcc (platformio-ide), but it looks like me .clang_complete file not being recognized!

Example (what I have): (folder)root-->(folder)src-->(file)main.c (folder)root-->(folder)src-->(file).clang_complete (folder)root-->(folder)include-->(file)structs.h


//main.c

include "structs.h"


//.clang_complete -Iinclude/ -I../include/

The error with autocomplete: structs.h: No such file or directory.

I've already tried with different syntax in the .clang_complete file, but I couldn't get it working! What am I missing here?

ivankravets commented 8 years ago

You need to specify a full path to include. Could you share your platformio.ini?

jmscaramal commented 8 years ago

@ivankravets There is no much in my platformio.ini. I've initialized a new project for Stellaris, just now, which have auto create a .clang_complete:

-I/home/scaramal/.platformio/packages/framework-energiativa/variants/stellarpad -I/home/scaramal/.platformio/packages/framework-energiativa/cores/lm4f -I/home/scaramal/.platformio/packages/framework-energiativa/cores/lm4f/avr -I/home/scaramal/.platformio/packages/framework-energiativa/cores/lm4f/driverlib -I/home/scaramal/.platformio/packages/framework-energiativa/cores/lm4f/inc -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/AIR430BoostEuropeETSI -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/AIR430BoostUSAFCC -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/Adafruit_TMP006 -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/CogLCD -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/EEPROM -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/EduBPMKII_Screen -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/Ethernet -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/LCD_SharpBoosterPack_SPI -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/M2XStreamClient -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/MQTTClient -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/OPT3001 -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/OneMsTaskTimer -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/OneWire -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/PubNub -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/PubSubClient -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/SPI -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/Servo -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/Stepper -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/Temboo -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/WiFi -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/Wire -I/home/scaramal/.platformio/packages/framework-energiativa/libraries/aJson -I/home/scaramal/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include -I/home/scaramal/.platformio/packages/toolchain-gccarmnoneeabi/lib/gcc/arm-none-eabi/4.8.4/include -I/home/scaramal/.platformio/packages/toolchain-gccarmnoneeabi/lib/gcc/arm-none-eabi/4.8.4/include-fixed -I/media/data/Dropbox/Mestrado/Codes/Workspace_Atom/Tiva_Hello/include -DF_CPU=80000000L -DARDUINO=101 -DENERGIA=17 -DPLATFORMIO=020806

I tried to add the bold line above with the full path, but still it doesn't find my "#include "structs.h"".

Anyway, my platformio.ini:

[env:lplm4f120h5qr] platform = titiva framework = energia board = lplm4f120h5qr

ivankravets commented 8 years ago

Are you sure that this is an auto-complete error? Maybe, GCC linter?

Try this:

[env:lplm4f120h5qr]
platform = titiva
framework = energia
board = lplm4f120h5qr
build_flags = -Iinclude

Them, Menu: PlatformIO > Rebuild C/C++ index

jmscaramal commented 8 years ago

@ivankravets Thankyou so much! You're right. It's a GCC linter error. I'm sorry for my mistake. Your solution worked and also with a .gcc-flags.json file (as explained in linter-gcc package). Thanks again.

ivankravets commented 8 years ago

Next time please use PlatformIO Community Forums. Thanks.

jmscaramal commented 8 years ago

I will...

ivankravets commented 8 years ago

Happy Coding with PlatformIO 😊