dbus_get_version was not declared in this scope 移植dbus,Qt4.8.1源碼中的bug:—- 續上

來源:互聯網
上載者:User

      接上篇,開始make,原以為不會有啥問題,因為以前不帶dbus用qt4.8.1交叉編譯過好多次,出現的問題都一一解決了。誰知make的時候出現錯誤:

In file included from qdbusconnection_p.h:70:0,
                 from qdbusconnection.cpp:52:
qdbus_symbols_p.h: In function 'void q_dbus_get_version(int*, int*, int*)':
qdbus_symbols_p.h:300:1: error: 'dbus_get_version' was not declared in this scope
make[1]: *** [.obj/release-shared-emb-arm/qdbusconnection.o] 錯誤 1
make[1]: 離開目錄“/home/yan/download/qt-everywhere-opensource-src-4.8.1/src/dbus”
make: *** [sub-dbus-make_default-ordered] 錯誤 2

說是這個dbus_get_version這個函數沒定義,這個函數在qt源碼的qt-everywhere-opensource-src-4.8.1/src/dbus/qdbus_symbols_p.h,開啟後能找到這個函數!

怎麼解決呢???

          先百度,沒有答案啊!接著google,在qt的國外官方使用者論壇裡,只找到關於這個bug的描述,沒有說咋修複https://bugreports.qt-project.org/browse/QTBUG-23249。搜遍google只找到這麼點資料,腫麼辦???耗費了三個小時為了這一句話,奶奶的,gedit  qdbus_symbols_p.h,然後將

-DEFINEFUNC(void , dbus_get_version , (int *major_version_p,- int *minor_version_p,- int *micro_version_p),- (major_version_p, minor_version_p, micro_version_p), )這一整句話用/*
  */直接屏蔽掉!!! 


      再make就ok了。 不知道往下make還會不會報錯,希望qt修複這個bug!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.