Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. 'omp.h' file not found
Forum Updated to NodeBB v4.3 + New Features

'omp.h' file not found

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 5 Posters 4.5k Views 2 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.
  • J Offline
    J Offline
    jumpy88
    wrote on last edited by jumpy88
    #1

    Hello everyone,
    I'm having an issue with OpenMP in Qt Creator. Annotations say it can not find omp.h and then all functions it defines are not recognized. However it builds correctly and F2 navigates to the file /usr/lib/gcc/x86_64-linux-gnu/7/include/omp.h
    My setup is:

    • Linux Mint 19 Tara
    • Qt Creator 4.11.0
    • Desktop Qt 5.12.6 GCC 64bit kit
    • g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

    It worked few days ago, so it may depend on some recent OS update. Does anyone have a solution for this issue?

    kshegunovK 1 Reply Last reply
    0
    • J jumpy88

      Hello everyone,
      I'm having an issue with OpenMP in Qt Creator. Annotations say it can not find omp.h and then all functions it defines are not recognized. However it builds correctly and F2 navigates to the file /usr/lib/gcc/x86_64-linux-gnu/7/include/omp.h
      My setup is:

      • Linux Mint 19 Tara
      • Qt Creator 4.11.0
      • Desktop Qt 5.12.6 GCC 64bit kit
      • g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

      It worked few days ago, so it may depend on some recent OS update. Does anyone have a solution for this issue?

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      That's probably the code model. You can either disable the annotations (i.e. disabling the clang code model) or provide additional includes to the relevant file - that's the button top left in the file edit, the one that says # is for giving additional preprocessor directives for the code parsing.

      Read and abide by the Qt Code of Conduct

      J J 2 Replies Last reply
      1
      • kshegunovK kshegunov

        That's probably the code model. You can either disable the annotations (i.e. disabling the clang code model) or provide additional includes to the relevant file - that's the button top left in the file edit, the one that says # is for giving additional preprocessor directives for the code parsing.

        J Offline
        J Offline
        jumpy88
        wrote on last edited by jumpy88
        #3

        Thank you @kshegunov for your reply. It's not proposing any additional file to be included. It's

        #include <omp.h>
        

        itself to fail with "file not found".
        Can you try to create a plain C++ project and just include omp.h? Just to know if this only affects me and if it could make sense to reinstall Qt Creator.

        kshegunovK 1 Reply Last reply
        0
        • J jumpy88

          Thank you @kshegunov for your reply. It's not proposing any additional file to be included. It's

          #include <omp.h>
          

          itself to fail with "file not found".
          Can you try to create a plain C++ project and just include omp.h? Just to know if this only affects me and if it could make sense to reinstall Qt Creator.

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by
          #4

          I don't think reinstalling Creator should fix it. As I said I believe it's just the code model that doesn't find the header, as you reported the project builds fine. That's why I suggested fiddling with its flags to make it understand where that's located.

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply
          1
          • F Offline
            F Offline
            ferdymercury
            wrote on last edited by ferdymercury
            #5

            Potentially related discussion: https://stackoverflow.com/questions/33400462/omp-h-file-not-found-when-compiling-using-clang
            https://bugreports.qt.io/browse/QTCREATORBUG-22442

            1 Reply Last reply
            1
            • kshegunovK kshegunov

              That's probably the code model. You can either disable the annotations (i.e. disabling the clang code model) or provide additional includes to the relevant file - that's the button top left in the file edit, the one that says # is for giving additional preprocessor directives for the code parsing.

              J Offline
              J Offline
              Jeff_D
              wrote on last edited by
              #6

              @kshegunov Could you say more detailedly where's that button? In my case (macOS Big Sur, HomeBrew LLVM), the omp.h even appears in the Include Hierarchy but the error parser still says file not found.

              jsulmJ 1 Reply Last reply
              0
              • J Jeff_D

                @kshegunov Could you say more detailedly where's that button? In my case (macOS Big Sur, HomeBrew LLVM), the omp.h even appears in the Include Hierarchy but the error parser still says file not found.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Jeff_D Help/Plug-ins/C++/ClangCodeModel

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                1

                • Login

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