AUTOGEN: error: The same ui_NAME.h file will be generated from different sources

  automoc, build, c++, cmake, qt

I get the following error trying to compile source that includes "ui_name.h" files using QT and CMake’s AUTOMOC turned on.

AUTOGEN: error: The same ui_NAME.h file will be generated from different sources.
To avoid this error rename the source files.
ui_filename.h : /my_repo/api/private/filename.ui
ui_filename.h : /my_repo/filename.ui

Both /my_repo/api/private and /my_repo/ contain includes "ui_filename.h", however, only /my_repo/ contains the actual source filename.ui. Is there a way to configure AUTOMOC to prevent this duplicate generation of ui files? I need to have headers in both api/private and my_repo/ .

Source: Windows Questions C++

LEAVE A COMMENT