开发者

Qt “forgets” to link one of my “moc_MyClass.o” objects

The source file is clearly in the project, among the rest of my classes.

I have开发者_如何学运维 Q_OBJECT defined for the class, like the rest of my Qt Classes.

My class compiles with the rest of the classes. Yet, the linker fails on the vtable for the constructor/destructor for my class. Checking the linker command: It seems like the moc_Myclass.cpp is never generated or built. so nothing to link against.

How can that be? why is it left out?


Troubling resolution: When I removed the cpp/h file from the projcet, and then added them back in the moc for my class began being generated correctly so link passed.

That's clearly a Qt "project cancer" bug, but at least now I know how to "cure" it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜