[Qt-creator] Qt Creator for Linux Kernel Development

Andrzej Telszewski atelszewski at gmail.com
Wed Nov 23 17:15:01 CET 2016


On 23/11/16 06:51, Jason A. Donenfeld wrote:
> Hello Eike & Qt Creator mailing list,
>
> I'm insane and decided to try using an IDE for Linux kernel
> development. Much to my delight, it actually works well. (Everybody on
> the mailing list to which this message is cross-posted just vomited a
> little bit in their mouth and swallowed

Actually not.
I did exactly that and I was very happy.
Having configured everything allowed for ease of testing and deployment.

> As you can see, it's a real hack.
>
> I also do development on the main Linux kernel tree, and similarly for
> that, I have a .pro file that works well:
>
> CONFIG -= qt
> INCLUDEPATH = $$system(find -L include/ -type d)
> SOURCES = $$system(find -L . -type f -iname \'*.c\')
> HEADERS = $$system(find -L . -type f -iname \'*.h\')
> INCLUDEPATH = include/ arch/x86/include
>

I don't remember exactly, but I used some other feature of QtC (Import 
Project was it?).
It allowed to easily setup QtC for kernel development.
It worked pretty well, most of the time.

Just a quick search:
http://stackoverflow.com/questions/5417732/howto-prepare-qtcreator-for-linux-driver-kernel-development

> (A) Qt Creator doesn't seem to parse the C correctly. Things like
> designated initializers and a few other C features here and there just
> don't get parsed correctly, and the IDE stops being useful. I suspect
> this is because things are actually being parsed in C++ mode. Bummer.
> Developers: any interest in improving C support in Qt Creator?
>

I too remember seeing false errors when code model parsed struct members 
initializers.

But this code seems to work just fine now:

typedef struct abc_t {
   int i;
   int j;
} abc_t;

abc_t b = {
   .i = 13,
   .j = 42,
};

i.e. no warnings about syntax.

I'm using QtC 4.2.0-beta1.

And yes, although I'm not going to be involved in enhancing QtC, I would 
love to see C receiving decent support.
QtC is my main (well, the only) IDE, and I write both C and C++ code.

> So, anyway, if you think it would be cool to be able to say, "Qt
> Creator is used for Linux Kernel Development!", then maybe we can work
> together to actually get things working properly. It's already 85%
> there, and the remaining chunk seems well within reach.
>

Yes, it would :-)

-- 
Best regards,
Andrzej Telszewski



More information about the Qt-creator mailing list