[update : 2016.05.12]


Qt4 install way : http://www.programering.com/a/MjM3kjNwATA.html


Qt5 Source code Build :

http://stackoverflow.com/questions/14932315/how-to-compile-qt-5-under-windows-or-linux-32-or-64-bit-static-or-dynamic-on-v

http://www.cyberforum.ru/qt/thread1079741-page2.html



1) Qt  소스 코드를 다운 받으세요.  (tar.gz)

http://www.qt.io/download-open-source/#section-2

2) 터미널열고 xcb 파일을 설치합니다.

https://wiki.qt.io/B

Building_Qt_5_from_Git    여기서  Libxcb 항목을 봅니다.

없으면 아래 명령어를 입력하여 설치하세요!  (Install these library using terminal)



Ubuntu (5.3.1 ~)

https://wiki.qt.io/Install_Qt_5_on_Ubuntu

  • Install g++

Open a terminal and execute the following command to install g+:

sudo apt-get install build-essential

Configure a compiler

Launch Qt Creator. Go to Tools > Options. Click Build & Run and select tab Kit. Configure a compiler if it is not automatically detected.

  • Install OpenGL libraries

Execute the following command to install OpenGL libraries:

sudo apt-get install mesa-common-dev

Note: Just installing the above-mentioned mesa-common-dev kit is not sufficient for more recent Ubuntu versions. Based on this comment in the forum an additional package needs installation. Execute following command:

sudo apt-get install libglu1-mesa-dev -y
  • Install ffmpeg & gstreamer (optional)
sudo apt-add-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg gstreamer0.10-ffmpeg


Fedora

libxcb libxcb-devel libXrender libXrender-devel xcb-util-wm xcb-util-wm-devel xcb-util xcb-util-devel xcb-util-image xcb-util-image-devel xcb-util-keysyms xcb-util-keysyms-devel




Qt5.3.2 have configure error about libxkb  and install
libxkbcommon-x11

 sudo apt-get install libxkbcommon-x11


3) 터미널에서 소스코드를 컴파일 해봅시다!   [Don't put sudo : ubuntu]

터미널에서 qt-everywhere-opensource-src-5.5.0  파일 받은 경로로 주세요.

소스코드 컴파일된 것을 저장할 경로를 prefix 에서 만들어줍니다.


[Qt 4.X 버전]
./configure --prefix=/home/사용자명/Qt/Qt4.8.5_x64 -opensource -confirm-license -release -developer-build -multimedia -webkit -svg 

fast way : -nomake examples -nomake demos

When failed to make, maybe gstreamer-app-0.10 not install.


Project ERROR: Package gstreamer-app-0.10 not found [CentOS 6]

yum install gstreamer-plugins-base-devel



[Qt 5.3 버전]


 ./configure --prefix=/opt/Qt5.3.2-x86src -release -opensource -confirm-license -developer-build -opengl desktop -qt-sql-sqlite -make libs -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -qt-xcb

[Qt 5.4 버전]

./configure -prefix "/home/ivan/Qt5.4.0_Static" -static -platform linux-g++ -release -opensource -confirm-license -fontconfig -no-compile-examples -nomake examples -nomake tests -nomake tools -opengl desktop -qt-sql-sqlite -make libs -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype


아래와 같은 창이 뜨면서 qmake 가 생성됩니다.

 


4) 경로를 qt-everywhere-opensource-src-5.5.0 이렇게 잡고, make 를 입력하여 컴파일 합니다.

[예상시간: 2시간 걸림]

qtdoc 까지 처리하면 컴파일이 완료 됩니다.

5) make install 을 입력합니다.

----------------------------------------------------------------------------------------

http://doc.qt.io/qt-5/linux-building.html

깨알 팁 > Qt configure 명령어를 알고 싶으면  ./configure --help  입력하면 됩니다..

~/Documents/qt-everywhere-opensource-src-5.5.0$  ./configure --help



저작자 표시
신고

'Tips > Qt Tip' 카테고리의 다른 글

Unable to debug Qt4.8.5 with CentOS6  (0) 2016.03.09
Qt 4.8.5 build error in centos 6.X  (0) 2016.02.07
HierarchicalHeaderView  (0) 2016.01.28
Build Qt soure code in Linux  (0) 2015.09.18
우분투에 설치된 Qt Creator 테마 바꾸기  (0) 2015.09.17
Customize QListWidgetItem  (0) 2015.04.02

WRITTEN BY
Profile
비타오백
Enjoy your stage!

받은 트랙백이 없고 , 댓글이 없습니다.
secret