Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Calling the functions of Qt from the C++ files
jigar23 last edited by
I have my own C++ file random.cc that includes files
I build my C++ file as
@g++ random.cc mainwindow.cpp -I ../qt/5.3/gcc_64/include/QtWidgets/ -I ../qt/5.3/gcc_64/include -fPIC@
However, it throws the following error:
@mainwindow.cpp:2:27: fatal error: ui_mainwindow.h: No such file or directory
Is there a way to prebuild the file ui_mainwindow.h.?
This is path issue. Compilation is not able to find the ui_main* files. You can use uic tool generate the ui_main*.h files and keep it where you require. Or you can use UI_DIR directive in pro file to keep you ui_main*.h into specific directory.
qxoz last edited by
Can you show your *.pro file
and what IDE you are using?