Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Howto prepare QTCreator for linux driver & kernel development

i tried a few IDEs on linux to develop driver in C. QtCreator suits best for me. I need the IDE just for the intellisence (codecompletion, jump to functions on click.. etc.) for quicker coding.

Has anyone configured QTCreator for such needs. E.g. what do i have to do to get intellisence for a struct?

regards camelord.

like image 897
camelord Avatar asked Mar 24 '11 10:03

camelord


People also ask

Where is Qt Creator install Linux?

The downloaded installer is named something like qt-unified-linux-x64-version-online. run and is likely located in your ~/Downloads directory.

How install Qt Linux?

Install Prerequisites The Qt installers for Linux assume that a C++ compiler, debugger, make, and other development tools are provided by the host operating system. If the tools are not present in your distribution, run the following commands in your terminal based on your distro.

Is Qt available for Linux?

Qt's support for different Linux platforms is extensive and mature. To download and install Qt for Linux, follow the instructions on the Getting Started with Qt page.


1 Answers

A better solution is to import the linux source with "Import Existing Project". Add all the files your ARCH requires. Once created edit the .includes file and remove all the include dirs listed.

Then just add the few that linux uses.

include
arch/<ARCH>/include
arch/<ARCH>/mach-<MACH>/include
arch/<ARCH>/<PLATFORM>/include

Now edit .config, this is the best bit. Add something like the following.

#define __KERNEL__
#define __arm__
#define __LINUX_ARM_ARCH__ 7

#include <linux/kconfig.h>

It's the #include that brings in all of the autoconf stuff you mostly want.

Do a make V=1 to see the standard defines that the Kernel build uses.

Also if you're using a cross compiler, set up as usual in "Build & Run" Compilers tab.

like image 142
Steven Kenny Avatar answered Oct 04 '22 21:10

Steven Kenny