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. Can I get code model tips using a GCC toolchain?
Forum Updated to NodeBB v4.3 + New Features

Can I get code model tips using a GCC toolchain?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 2 Posters 1.6k 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.
  • N Offline
    N Offline
    nathanb
    wrote on last edited by
    #1

    I just recently switched from Eclipse to QT Creator, and so far I'm very happy. The biggest problem I've had so far is that the Clang Code Model plugin will give me errors about GCC symbols that are apparently undefined (I get errors such as "function-like macro '__glibc_use' is not defined"), which will keep it from parsing a header and cause it to give me false errors.

    I've currently disabled Clang Code Model so that I don't have all these false errors littering my code, but I do find it helpful when it actually works. Is there a way to get the benefits of the plugin without these problems?

    JKSHJ 1 Reply Last reply
    0
    • N nathanb

      I just recently switched from Eclipse to QT Creator, and so far I'm very happy. The biggest problem I've had so far is that the Clang Code Model plugin will give me errors about GCC symbols that are apparently undefined (I get errors such as "function-like macro '__glibc_use' is not defined"), which will keep it from parsing a header and cause it to give me false errors.

      I've currently disabled Clang Code Model so that I don't have all these false errors littering my code, but I do find it helpful when it actually works. Is there a way to get the benefits of the plugin without these problems?

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by JKSH
      #2

      Hi @nathanb, and welcome!

      Can I get code model tips using a GCC toolchain?

      Unfortunately not. GCC does not expose the details required to create a code model.

      "function-like macro '__glibc_use' is not defined"

      Do you know which header defines __GLIBC_USE()? If you explicitly include its directory in your project (e.g. INCLUDEPATH += /path/to/header), that might make Clang happy.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      1
      • N Offline
        N Offline
        nathanb
        wrote on last edited by
        #3

        Hi @JKSH, thanks for your reply!

        I believe the GLIBC macros are from /usr/include/features.h. Is there a way to have QT Creator index that file without explicitly including it in the project? The project itself builds fine, so I'd rather not clutter up our cmake files with unnecessary directives. (The same reasoning applies to creating a clang_hacks.h that defines the GCC macros and symbols to keep clang happy).

        JKSHJ 1 Reply Last reply
        0
        • N nathanb

          Hi @JKSH, thanks for your reply!

          I believe the GLIBC macros are from /usr/include/features.h. Is there a way to have QT Creator index that file without explicitly including it in the project? The project itself builds fine, so I'd rather not clutter up our cmake files with unnecessary directives. (The same reasoning applies to creating a clang_hacks.h that defines the GCC macros and symbols to keep clang happy).

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @nathanb said in Can I get code model tips using a GCC toolchain?:

          Is there a way to have QT Creator index that file without explicitly including it in the project?

          I don't know, sorry. I'll let an experienced person reply.

          If you don't get anything from this forum, try the Qt Creator mailing list: https://lists.qt-project.org/listinfo/qt-creator (You must subscribe before posting)

          P.S. It's "Qt", not "QT". The latter stands for Apple QuickTime.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          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