linux 2010-05-11 18:11:05 閱讀50 評論0 字號:大中小
qvfb.cpp:771: 錯誤:‘DeviceSkinParameters’ 在此作用域中尚未聲明
qvfb.cpp:771: 錯誤:expected `;'' before ‘parameters’
qvfb.cpp:773: 錯誤:‘parameters’ 在此作用域中尚未聲明
qvfb.cpp:773: 錯誤:‘DeviceSkinParameters’ is not a class or namespace
make: *** [.obj/release-shared/qvfb.o] 錯誤 1
解決方法:
qvfb.cpp:47:24: 錯誤:deviceskin.h:沒有那個文件或目錄
一般差頭文件會導致cpp文件中很多數(shù)據(jù)結構和常量沒有定義。找到頭文件deviceskin.h在qt-x11-opensource-src-4.5.2/tools/shared/deviceskin/下面。拷貝到qvfb文件夾下。
再編譯:
.obj/release-shared/x11keyfaker.o:/home/src/qt-x11-opensource-src-4.4.3/tools/qvfb/x11keyfaker.cpp:459: more undefined references to `XTestFakeKeyEvent'' follow
.obj/release-shared/x11keyfaker.o: In function `X11KeyFaker::connect()'':
/home/src/qt-x11-opensource-src-4.4.3/tools/qvfb/x11keyfaker.cpp:544: undefined reference to `XTestQueryExtension''
collect2: ld 返回 1
make: *** [qvfb] 錯誤 1
能看出來有兩個方面的錯誤,一個是DeviceSkinParameters類的函數(shù)連接,另一個XTestFakeKeyEvent函數(shù)的問題。
解決辦法是:
1.復制deviceskin.h,deviceskin.cpp到qvfb文件下。
2.在qvfb文件夾下手動生成qvfb工程。(例:/home/2410sQt/host/qt-4.5.2/bin/qmake -project))
3.qmake;
4.vi Makefile 修改Makefile 中 LIBS 選項: 添加 -lXtst選項。
再編譯有錯誤-lXtst not commond
解決辦法 :
yum install libxtst-dev
重新編譯 make文件生成后LIBS 選項: 添加 -lXtst選項。
我出現(xiàn)如下錯誤
[root@jswinter qvfb]#: qvfb & //試運行qvfb
[1] 13827
[root@jswinter qvfb]# qvfb: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory
解決方法:結果證明事路徑的問題,我重新export下路徑,界面出來了