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. General include file error
Forum Updated to NodeBB v4.3 + New Features

General include file error

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 3 Posters 1.8k Views
  • 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.
  • A Offline
    A Offline
    Abhijeet Gurav
    wrote on last edited by
    #1

    I am getting below error in qt creator.

    Error - in included file: main file cannot be included recursively when building a preamble

    Please provide solution on this error

    jsulmJ 1 Reply Last reply
    0
    • A Abhijeet Gurav

      I am getting below error in qt creator.

      Error - in included file: main file cannot be included recursively when building a preamble

      Please provide solution on this error

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

      @Abhijeet-Gurav said in General include file error:

      Please provide solution on this error

      Please provide more information.
      What are you including where? It looks like you have reqursive includes.

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

      1 Reply Last reply
      1
      • A Offline
        A Offline
        Abhijeet Gurav
        wrote on last edited by
        #3

        In 1 user defined include file I am including another user defined include file with one more user defined include file. Total 3 user defined include files.
        and in that one more user defined include file I need another user defined include file so I am including that.
        This is little bit confusing but in this case I am getting error.

        JonBJ 1 Reply Last reply
        0
        • A Abhijeet Gurav

          In 1 user defined include file I am including another user defined include file with one more user defined include file. Total 3 user defined include files.
          and in that one more user defined include file I need another user defined include file so I am including that.
          This is little bit confusing but in this case I am getting error.

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by
          #4

          @Abhijeet-Gurav
          Well the "solution" is to untangle your #includes so that you don't need a circular include. You probably should not need to. Otherwise check the #ifndef guard statements at the head of each included file which Qt would put in for you if you let it create the files from classes or you may have put in yourself.

          1 Reply Last reply
          2

          • Login

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