在slot()外定义一个extern double a;
可是,却在最后时刻列出一堆奇怪的错误,大家看看这些是什么?
init_system.o(.text+0x0):/home/ztt/qt/zt9/mainform.ui.h:12: first defined here
closeform.o(.text+0x32e: In function `closeForm::parainputslot()':
/usr/include/stdlib.h:608: undefined reference to `qstop'
closeform.o(.text+0x3342):/usr/include/stdlib.h:608: undefined reference to `qstart'
55555555555555
救命呀!~>_<~
init_system.o(.text+0x1401): In function `Menu_Encoder(double&, double&, double&, double&, double&)':
/home/ztt/qt/zt9/init_system.cpp:789: undefined reference to `qblock'
init_system.o(.text+0x141b):/home/ztt/qt/zt9/init_system.cpp:798: undefined reference to `qstart'
init_system.o(.text+0x143c):/home/ztt/qt/zt9/init_system.cpp:865: undefined reference to `qIter'
init_system.o(.text+0x144b):/home/ztt/qt/zt9/init_system.cpp:833: undefined reference to `qstop'
collect2: ld returned 1 exit status
make: *** [zt9] Error 1
为什么是.o文件编译出错呢?