Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [SOLVED]QtCreator, Linux: how disable default search headers in /usr/include?
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]QtCreator, Linux: how disable default search headers in /usr/include?

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 2 Posters 8.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kuzulis
    Qt Champions 2020
    wrote on last edited by
    #1

    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/include

    I 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?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      IIRC Creator asks your compiler for its include search locations, so please be sure that your compiler does not return /usr/include when asked.

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kuzulis
        Qt Champions 2020
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kuzulis
          Qt Champions 2020
          wrote on last edited by
          #4

          Solution: need add to *.pro this:

          [quote]
          QMAKE_CXXFLAGS = -I/usr/src/linux-3.1.8-1-ARCH/include

          QMAKE_CFLAGS = -I/usr/src/linux-3.1.8-1-ARCH/include
          [/quote]

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved