[SOLVED]QtCreator, Linux: how disable default search headers in /usr/include?
-
Hi all.
I want to use QtCreator as a text editor with syntax highlighting and autocompletion
for the development of Linux kernel modules.I need that QtCreator make searching headers always to only at the specified location,
example in: /usr/src/linux-3.1.7-1-ARCH/includeI tried to *. pro file hardcoding:
INCLUDEPATH=/usr/src/linux-3.1.7-1-ARCH/include
But it does not work. QtCreator anyway looking for headers in /usr/include
That in this situation can be done? -
IIRC Creator asks your compiler for its include search locations, so please be sure that your compiler does not return /usr/include when asked.
-
2 peppe,
tell me please, more specifically - how do I ask the compiler, for its return value?
So what is necessary for solve the problem?--
I found this description: http://gcc.gnu.org/onlinedocs/cpp/Search-Path.html
Where quote:
[quote] You can prevent GCC from searching any of the default directories with the -nostdinc option. This is useful when you are compiling an operating system kernel or some other program that does not use the standard C library facilities, or the standard C library itself. -I options are not ignored as described above when -nostdinc is in effect. [/quote]But this does not apply to QtCreator
-
Solution: need add to *.pro this:
[quote]
QMAKE_CXXFLAGS = -I/usr/src/linux-3.1.8-1-ARCH/includeQMAKE_CFLAGS = -I/usr/src/linux-3.1.8-1-ARCH/include
[/quote]