QTCreator & AVR, AutoComplete and type highlighting

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

good afternoon

 

qtcreator - AutoComplete and type highlighting does not work AVR-type, such as int8_t etc... (necessary for writing under the AVR)

 

copy methods "from kate" and etc, from internet, and other (on,off,change) - can't work:

~/config/qtcreator/generic-highlighter
/usr/share/apps/katepart/syntax

 

theme "worked/in search", but no solutions found

 

on inet write: qtcreator has a built-in or similar kate-ver, and not quite right (with errors)

 

We express, philosophize, ideas ... :о)

 

qtcreator-3.1.2 version will not change (constant)

 

Thank you

 

p.s. apologize for my english

 

### UPDATE ###

this project is build & make without error

 

 

This topic has a solution.

if I'm wrong, correct this and do not criticize :o)

Last Edited: Thu. Aug 9, 2018 - 10:43 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

 

I don't see your problem. Both works for me in Qt Creator 4.6.1

 

Note however that auto completion only starts after five characters by default, so int8_t will only be completed after the underscore.

 

Edit: did you include inttypes.h or stdint.h? Otherwise, the types might be unknown to the indexer and thus will not be recognized

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

Last Edited: Wed. Aug 8, 2018 - 10:22 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

### UPDATE 1 ###

this project is build & make without error, but anyway the autocomplete and type highlighting  does not work

 

refinement: the project is going right away (make & build), but there is no highlighting and autocompletion (just right away)

 

### UPDATE 2 ###

 

I guess (I'm 99% sure, but I need to clarify) your project is naturally qt-oriented or similar

 

if you create a CUSTOM NO-QT project (my project is AVR-based), then then ...

 

perhaps the version of qt-creator (you have the older/newest one, which is collected with the help of qt5, all the consequences ...)

 

let's clarify the details:
I will experiment with the settings and projects qtcreator

YOU, please (if you wont):
- archive your mini project, I'll try it on my own qtcreator
- create a simple NO QT project with makefile

 

see what happens

 

thanks

 

p.s. what font do you use? (something familiar :o)

 

### UPDATE ###

 

problem solved, details:

 

my project is going to "default immediately," no problem w/o qtcreator, on command string, even before "import into the qtcreator-project"

 

In occasion of the project it is necessary to specify:

 

1. the project is created by the "export an existing project":
File / New File or Project / Import Project / Import Existing Project

 

2. a "minimal project" is created without a "build system" (use makefile)

make all
make clean
make flash/upload
etc...

3. the project is collected immediately without errors (of course, because before that he was already going to without problems)

 

4. the problems were manifested only in the "subj", is solved by setting or adding directories to the project file *.includes

 

this setting does not affect the build, only "solution subj problems" (backlight and autocompletion AVR-types)

 

5. my qtcreator-3.1.2/qt4 - does not have libraries (*)

 

I assume that they are "just so" not going to qt4-version, but I saw the "blob/bin package" for Ubuntu, on the QT-offsite with all this (*) library & plugins

 

move this lib & plug - without result

 

(*) - missing libraries & plug:

- libclang.so
- libClangCodeModel.so
- ClangCodeModel.pluginspec

 

originally my qtcreator was a binary with offsite

 

 

I tried to build it myself from the sources, but the result is the same, the file sizes to within a byte  :o)

 

as a result:

- project is mini (Import Existing Project)
- build with makefile (w/o qmake, cmake, qbs)
- build as default immediately and without problems
- backlight and autocompletion avr - resolve method is *.includes (project file)
- use qtcreator-3.1.2 (bin from offsite and selfbuild pack)
- qt-4.8.7 (any more QT-ver, but with qtcreator use this version)
- tools (avr-gcc-4.9.2, avr-toolchains 3.4.2, 3.5.4, 3.6.1)
- while "all that was expected" from qtcreator-s - on the spot, works, puffs, smokes and plows :о)

 

need close attention to build from source on unavailable libraries, possibly broken or missing dependencies

 

what are the opinions?

 

thanks to all

 

p.s.

#
# cat *.includes
#

#
# avr-gcc-4.9.2-i486-sl12.2
#
/usr/lib/gcc/avr/4.9.2/plugin/include/
/usr/lib/gcc/avr/4.9.2/plugin/include/c-family
/usr/lib/gcc/avr/4.9.2/plugin/include/config
/usr/lib/gcc/avr/4.9.2/plugin/include/config/avr
/usr/lib/gcc/avr/4.9.2/plugin/include/cp

#
# avr-libc-1.8.1-i486-sl12.2
#
/usr/avr/include
/usr/avr/include/avr
/usr/avr/include/compat
/usr/avr/include/sys
/usr/avr/include/util
/usr/i486-slackware-linux/avr/include

# etc blah-blah-blah ...


 

if I'm wrong, correct this and do not criticize :o)

Last Edited: Thu. Aug 9, 2018 - 11:18 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To highlight int8_t the code parser needs to be aware of the location of the Avr-LibC copy of stdint.h so it can see the typedef. Does it know the location of LibC?
.
Looking at https://github.com/eng-mg/CuteAVR/blob/master/CuteAVR.pro it seems the key things are that QMAKE_INCDIR and QMAKE_LIBDIR are set to the right place.

Last Edited: Thu. Aug 9, 2018 - 09:22 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

!!! NO QMAKE (and other build-system) !!!

about CuteAVR.pro - this tool I have, I'm well informed about it: o)

 

the problem is solved, can you (or want to) clarify something about this?

 

thanks

if I'm wrong, correct this and do not criticize :o)

Last Edited: Thu. Aug 9, 2018 - 10:44 AM