使用 qt _ dev_c++ 编译时有如下错误.请大家指点

weixin_38082853 2019-09-19 03:08:47
[Linker error] undefined reference to `_imp___ZN12QApplicationC1ERiPPci' [Linker error] undefined reference to `_imp___ZN6QLabelC1ERK7QStringP7QWidget6QFlagsIN2Qt10WindowTypeEE' [Linker error] undefined reference to `_imp___ZN12QApplication4execEv' [Linker error] undefined reference to `QApplication::~QApplication()'[Linker error] undefined reference to `QApplication::~QApplication()' [Linker error] undefined reference to `_imp___ZN7QString4freeEPNS_4DataE' [Linker error] undefined reference to `_imp___ZN7QString16fromAscii_helperEPKci' ld returned 1 exit status上面是编译时候报的错误.我使用的是:qt-win-opensource-4.2.3-mingw.exe + devcpp-4.9.9.2_setup.exe已经进行了 build debug library. 并在 Dev_C++ 中进行了 Qt 的一些相关设置.如果我使用 Qt 4.2.3 Command Prompt 进行编译的话,居然提示:g++    Hello.cpp  -o HelloHello.cpp:1:24: QApplication: No such file or directoryHello.cpp:2:18: QLabel: No such file or directoryHello.cpp: In function `int main(int, char**)':Hello.cpp:6: error: `QApplication' undeclared (first use this function)Hello.cpp:6: error: (Each undeclared identifier is reported only once for each function it appears in.)Hello.cpp:6: error: expected `;' before "app"Hello.cpp:7: error: `QLabel' undeclared (first use this function)Hello.cpp:7: error: `label' undeclared (first use this function)Hello.cpp:7: error: `QLabel' has not been declaredHello.cpp:10: error: `app' undeclared (first use this function)我已经进行了环境变量设置了.是不是我的环境变量设置有问题呢? 还请大家指点一二.谢谢先.
...全文
201 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复

435

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧