General include file error
-
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
-
@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. -
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. -
@Abhijeet-Gurav
Well the "solution" is to untangle your#include
s 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.