当前位置: 代码迷 >> QT开发 >> undefined reference to有关问题!
  详细解决方案

undefined reference to有关问题!

热度:153   发布时间:2016-04-25 03:07:29.0
undefined reference to问题!!!
main.c:(.text+0x7): undefined reference to `test'  
collect2: ld returned 1 exit status 

test是在mainwindow.h中定义的全局变量,然后在main.cpp和mainwindow.cpp中使用时出现这个问题,求助
------解决思路----------------------
谁定义了db_para
可以在mainwindow.cpp加
QSqlDatabase db_para;
试试
  相关解决方案