linux에서 qt 개발 환경 설치
현재 최신 버전은 4.80입니다.
가다ftp://ftp.qt.nokia.com/qt/source/qt 원본 다운로드: qt-everywhere-opensource-src-4.7.4.tar.gz
압축 해제:
tar zvxf qt-everywhere-opensource-src-4.7.4.tar.gz
압축 풀기 디렉토리로 들어가기
cd qt-everywhere-opensource-src-4.7.4
설치된 도움말 파일 보기
cat INSTALL
안에 x11 플랫폼의 설치 링크가 있습니다.http://qt.nokia.com/doc/4.7/install-x11.html, 이 링크에 들어가면 모든 설치 강좌가 있습니다.
X11을 설치한 라이브러리가 없으면 중간에 컴파일하는 데 오류가 발생할 수 있음을 주의하십시오
설치가 완료되면 간단한 Hell, 월드를 써서 테스트해 보세요.
1 #include <QApplication>
2 #include <QtGui/QLabel>
3 #include <QString>
4
5 int main(int argc, char *argv[])
6 {
7 QApplication a(argc, argv);
8
9 QString qStr("hello, qt");
10 QLabel *label = new QLabel(qStr);
11 label->show();
12
13 return a.exec();
14 }
qmake -project//생성.pro 프로젝트 파일
qmake//makefile 생성
make
실행./hello,hell,qt
qt에는 경량급 IDE가 하나 더 있습니다. 제가 전에 내린 것은 qt-creator-linux-x86-opensource-2.3.1입니다.bin,./qt-creator-linux-x86-opensource-2.3.1.bin이 실행되면 설치할 수 있으며 설치가 완료되면 새 프로젝트 테스트를 할 수 있습니다.
이로써 qt 개발 환경이 설정되었습니다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Ubuntu 22.04에 캐디 설치 - HostnExtra이 기사에서는 Ubuntu 22.04에 Caddy를 설치하는 방법을 설명합니다. 이 문서는 설치 프로세스를 안내하고 웹 사이트를 호스팅합니다. Caddy 웹 서버는 Go로 작성된 오픈 소스 웹 서버입니다. Ubunt...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.