QT提示undefined reference to `qMain(

QT结合sdl做视频播放器,报如下错误:

c:\Users\qt\work\qt\qtbase\src\winmain\qtmain_win.cpp:111: error: undefined reference to `qMain(int, char**)'

查明原因是SDL和QT同时定义了main。

解决方法:

在main函数前加上

#undef main

猜你喜欢

转载自blog.csdn.net/NBA_1/article/details/80513148