qt qxorm编译报错
D:\QT_Project\qxormtest\user.cpp:10: warning: 'void qx::register_class(T&) [with T = qx::QxClass<user>]' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
..\user.cpp:10:20: warning: 'void qx::register_class(T&) [with T = qx::QxClass<user>]' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
template <> void register_class(QxClass<user> &t)
^~~~~~~~~~~~~~
D:\QT_Project\qxormtest\user.h:15: error: undefined reference to `__imp__ZTV4user'
debug/user.o: In function `user::user()':
D:\QT_Project\qxormtest\Debug_gw64/../user.h:15: undefined reference to `__imp__ZTV4user'
确认是否缺少编译判断:
缺少时,会是灰色:
QT :-1: error: one or more PCH files were found, but they were invalid
QT项目,点击构建->清除,再重新构建