以下是我這次所出現的問題
.obj/release-shared/mainwindows.o(.text+0x5d34): In function `MainWindows::MainWindows(QWidget*)':
: undefined reference to `GPRSATCmd::GPRSATCmd(QObject*)'
.obj/release-shared/mainwindows.o(.text+0x7110): In function `MainWindows::MainWindows(QWidget*)':
: undefined reference to `GPRSATCmd::GPRSATCmd(QObject*)'
collect2: ld returned 1 exit status
make[3]: *** [mainwindows] Error 1
make[3]: Leaving directory `/home/flykof/build-qtopia/mainwindows'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/flykof/build-qtopia/mainwindows'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/flykof/build-qtopia/mainwindows'
make: *** [all] Error 2
然而問題解決的方式,也很簡單,其實只是因為 XXX.pro 這個project檔案沒有將新增加的檔案(gprs.c gprs.h)更新。如:
---mainwindows.pro---
…
HEADERS += mainwindows.h qthead.h rfid-class.h libdatabase.h gprs.h
SOURCES += main.cpp mainwindows.cpp rfid-class.cpp libdatabase.cpp gprs.cpp
…
下面這個網站,他也有介紹一些相關的內容,有興趣可以去看一下。
http://www.itgrass.com/a/cjj/C-sl/200812/18-9418.html
留言列表