我使用4.3.3。将so文件放到特定目录。
然后在工程文件中增加:LIBS += -L.-libTQInputMethod.so
接着,我qmake MyTest.pro
qmake -o Makefile
make
运行make的时候,出现如下错误:
arm-linux-g++ -Wl,-O1 -Wl,-rpath,/opt/EmbedSky/qt-4.5/__install/arm/lib -o MyTest main.o mainwindow.o formtest.o moc_mainwindow.o moc_formtest.o moc_TQInputMethod.o -L/opt/EmbedSky/qt-4.5/__install/arm//lib -L.-libTQInputMethod.so -lQtGui -L/tslib-1.4/lib -L/opt/EmbedSky/qt-4.5/__install/arm//lib -lts -lQtNetwork -lQtCore -lm -lrt -ldl -lpthread
moc_TQInputMethod.o: In function `TQInputMethod::qt_metacall(QMetaObject::Call, int, void**)':
moc_TQInputMethod.cpp:(.text+0x40): undefined reference to `TQInputMethod::sendContent(QString const&)'
moc_TQInputMethod.cpp:(.text+0x60): undefined reference to `TQInputMethod::confirmContent()'
moc_TQInputMethod.o:(.rodata+0x5c): undefined reference to `TQInputMethod::~TQInputMethod()'
moc_TQInputMethod.o:(.rodata+0x60): undefined reference to `TQInputMethod::~TQInputMethod()'
moc_TQInputMethod.o:(.rodata+0x8c): undefined reference to `TQInputMethod::updateHandler(int)'
collect2: ld returned 1 exit status
make: *** [MyTest] 错误 1
|