I am trying to convert my Qt application to MDI (Multiple Document Interface).
I built the mdi example and everything works smoothly.
Now, following the example, I modified my code, adding this line at the beginning of main():
Q_INIT_RESOURCE(mdi);
I also #include <QApplication>
and <QtGui>
.
I get this linker error:
main.cpp:24: undefined reference to 'qInitResources_mdi()'
Why is that line accepted in the example and not in my code? I include the same headers, and the makefiles seem not to be the reason.
Platform: Windows 7, MinGW, Qt 4.8.4
OK, I thought that Q_INIT_RESOURCE(mdi)
was needed to initialize the application in Multiple Document Interface mode. Instead it just loads a set of files (icons in this case) that were missing from my project.
Removing that line fixed the problem.