Re: [問題] 如何在Qt Creator內使用libqxt

看板C_and_CPP作者時間13年前 (2010/11/02 09:11), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串3/3 (看更多)
我在 linux 上, 用起來很正常. 我描述一下我的環境, 看對你有沒有參考價值 --- 安裝 libqxt ----- 我解開 libqxt 之後並沒有現成的 lib 可用, 得 make, 做出 lib 之後, make install, 發現它是安裝在 /usr/local/qxt --- compile 我的小程式 ----- .pro 裏, 只加 CONFIG += qxt QXT += core gui 然後 qmake -makefile 再 make, 成功 ! ----------------- 我看一下 makefile, 發現它很自動的加了 include path /usr/local/Qxt/include, /usr/local/Qxt/include/QxtGui, /usr/local/Qxt/include/QxtCore lib path 則加了 /usr/local/Qxt/lib link 有 -lQxtGui -lQxtCore ※ 引述《Kenqr (夏天的微笑)》之銘言: : .pro檔增加以下內容 : (lib資料夾裡沒有.lib檔 只有.a和.dll檔 2種都試過了 錯誤訊息一樣) : CONFIG += qxt : QXT += core gui : INCLUDEPATH += C:/Qt/libqxt/include/QxtCore \ : C:/Qt/libqxt/include/QxtGui : win32:LIBS += C:/Qt/libqxt/lib/libQxtCore.a \ : C:/Qt/libqxt/lib/libQxtGui.a : main.cpp一樣只增加一行 : #include <QxtGlobalShortcut> : build時會出現以下錯誤訊息 : (main.cpp第一行就是#include <QxtGlobalShortcut>) : In file included from ..\LibQxtTest\main.cpp:1: : [debug/main.o] Error 1 : 請問是哪裡錯了呢? : 順便問一下 台灣有專門討論Qt的討論區嗎? : ※ 引述《Kenqr (夏天的微笑)》之銘言: : : ( *[1m *[m 為色碼,可以按 Ctrl+V 預覽會顯示的顏色 ) : : ( 未必需要依照此格式,文章條理清楚即可 ) : : 遇到的問題: (題意請描述清楚) : : 我正在寫一個程式 需要全域快速鍵的功能 : : 但是qt沒有提供全域快速鍵的功能 : : 所以想用libqxt提供的QxtGlobalShortcut : : 我把libqxt解壓縮在C:\Qt\底下 : : configure和make都正常結束 : : 在專案的.pro檔裡加入以下2行 : : CONFIG += qxt : : QXT += core gui : : 在.cpp檔裡#include <QxtGlobalShortcut> : : build就會得到以下錯誤訊息: : : QxtGlobalShortcut: No such file or directory : : 請問是少了什麼步驟或是做錯了哪個步驟呢? : : 開發平台: (例: VC++ or gcc/g++ or Dev-C++, Windows or Linux) : : Qt Creator 2.0.1 : : Qt 4.7.0 : : LibQxt 0.6.0 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.204.178.181

11/02 23:06, , 1F
謝謝你的回應 我想我應該是安裝libqxt的步驟有誤 繼續研究中
11/02 23:06, 1F
文章代碼(AID): #1CpsKeTq (C_and_CPP)
文章代碼(AID): #1CpsKeTq (C_and_CPP)