specific tips are as follows:
APP\DEBUG\MOC_SCOPEWIDGET.CPP:56: Error: Definition of static data member ' Scopewidget::staticmetaobjectextradata ' of DllImport ' d class
There are also some caveats:
APP\DEBUG\MOC_SCOPEWIDGET.CPP:56: Warning: ' Scopewidget::staticmetaobjectextradata ' redeclared without dllimport Attribute after being referenced with DLL linkage
Not only do staticmetaobjectextradata have such warning messages, but there are also many other static functions.
thinking:
It is supposed that debug this place does not need to moc_scopewidget.cpp file, but in the project to add the corresponding Scopewidget.h header file, automatically generated this file, and caused errors.
process: originally to Qtcreator not too understand, at this time is not escape, a lot of Google, finally found a good post:
http://www.qtforum.org/article/26708/shared-library-compilation-error.html?s= 648c17887f3ae72775fc9386fc3c403e37ca7334#post92829
The general meaning is that there is no problem in SDK4.7.4, but this problem exists in 4.8.1.
The solution is simple and gives the force:
HEADERS + = mainwindow.h Libs/myclass/myclass.htryheaders + = Mainwindow.hheaders is processed by MOC, but don't need It this time. Http://doc.trolltech.com/4.4/qmake-varia...ce.html#headers#include "Libs/myclass/myclass.h"//only in unit where it is Used.
Follow the instructions to remove the ScopeWidget.h from the project and recompile the project tree. Conclusion:
Pro files in chunks
HEADERS + = mainwindow.h \
.. /scopewidget/scopewidget.h
Change to the following (delete the second line):
HEADERS + = Mainwindow.h
So 4.8.1 will not be in the main program Debug folder automatically generated moc_scopewidget.cpp files, there is no such as the error.
feeling: 1, found the problem clue, but did not really think to depth, too much reliance on the search.
2, mainly on the Qtcreator dynamic library is not familiar with the cause.
3, perception ah, perception, I am not many.