Compiling the environment
- CentOS 64-bit Desktop version: 6.5
Pre-compilation Preparation:
CentOS users do not have root permissions by default, and if the current user does not have permission root, you can execute the following command in the terminal:
su root
sudo sed -i ‘/root\tALL=(ALL)/a *自己的用户名*\tALL=(ALL)\tALL‘ /etc/sudoers
exit
Need to replace your user name
Install Git
sudo yum install git
Installing development tools
sudo yum groupinstall "Development Tools"
Install the Development library
sudo yum install libX11-devel, libXext-devel, libXtst-devel
sudo yum install libX11-devel libXext-devel libXtst-devel
sudo yum install libXrender-devel
sudo yum install zlib-devel
sudo yum install openssl-devel
sudo yum install flex bison gperf libicu-devel libxslt-devel ruby
sudo yum install libxcb libxcb-devel xcb-util xcb-util-devel
sudo yum install freetype-devel
sudo yum install fontconfig-devel
Download and install QT 4.8.6
wget http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz
tar xvfz qt-everywhere-opensource-src-4.8.6.tar.gz
cd qt-everywhere-opensource-src-4.8.6
./configure -webkit
gmake
sudo gmake install
NoteWhen executing the./configure-webkit command, you need to ensure that the WebKit, Ssl,fontconfig,xrender can be compiled correctly, as follows:Qt 3 compatibility ... yes
Qtdbus module .... No.
Qtconcurrent code ... yes
Qtgui module .... Yes..
Qtscript module ... yes
Qtscripttools module ... yes
Qtxmlpatterns module ... yes
Phonon module .... No.
Multimedia module ... auto
SVG module .... Yes, ....
**webkit module .... yes**.
JavaScriptCore JIT ..... To is decided by JavaScriptCore
Declarative module ... yes
Declarative debugging ... yes
Support for S60 ... no
Symbian DEF files ... no
STL support ... yes, I ...
PCH support ... yes, no.
Mmx/3dnow/sse/sse2/sse3. Yes/yes/yes/yes/yes
ssse3/sse4.1/sse4.2 ... Yes/yes/yes
AVX ... yes, I'm ... a.?????
Graphics System ..... default
IPV6 support ... yes, no.
IPV6 ifname support .... Yes
Getaddrinfo support .... Yes
Getifaddrs support ... yes
Accessibility .... Yes.
NIS support ..... yes.
CUPS support ... no, no.
Iconv support .... Yes.
Glib support ... no, no.
GStreamer support ... no
PulseAudio support ... no
Large File Support ... yes
GIF support ...... plugin
TIFF support ..... plugin (QT)
JPEG support ..... plugin (QT)
PNG support .... Yes (QT) ()
MNG support ... plugin (QT) .....
Zlib support ... system for the ...
Session Management ... no
OpenGL support .... No
OpenVG support ... no.
NAS Sound Support ... no
Xshape support ... yes.
XVideo support ... no.
Xsync support .... Yes.
Xinerama support ... no
Xcursor support ... no
Xfixes support ... no.
Xrandr support ... no.
**xrender support ... yes**
Xi support ... no, ... no.
MIT-SHM support ... yes
**fontconfig support ... yes**
XKB support ... yes, no.
Immodule support ... yes
GTK Theme Support ... no
SQLite support ... plugin (QT)
**openssl support ... yes (run-time) * *
Alsa support ... no, no.
ICD support ... no, no.
LIBICU support ... yes.
Use System proxies ... no
If the above few show no, reinstall the previous development library. QT compilation takes a long time, please wait slowly.
Compiling and installing CMake
Since the CentOS CMake (or the cmake installed via RPM) is relatively low, it is necessary to compile the installation yourself.wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz
tar -zxv -f cmake-2.8.12.2.tar.gz
cd cmake-2.8.12.2
./configure
gmake
sudo make install
Download Compile Wiznote
git clone https://github.com/WizTeam/WizQTClient.git
cd WizQTClient
git checkout testing
./centos-package.sh
If there are no errors, a Wiznote folder will be generated under the Wizqtclient sibling directory, and the bin/wiznote can be executed to run Wiznote after entry.
Installing Qtcreator
Note: If you do not need to develop, you do not need to install qtcreator. If you need to develop debugging, you can install.
Because the libstdc++.so.6 version above CentOS is too low, you also need to compile and install GCC to run qtcreator correctly.
First, download the Qtcreator from qt-project.org and install it. Running Qtcreator after installation usually prompts some plugins to fail to load, causing the project to not open properly. We need to compile gcc.
Compiling and installing GCC
dependencies required for networked installations during configuration.
wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.8.1/gcc-4.8.1.tar.bz2
tar -jxvf gcc-4.8.1.tar.bz2
cd gcc-4.8.1
./contrib/download_prerequisites
cd ..
mkdir gcc-build-4.8.1
cd gcc-build-4.8.1
../gcc-4.8.1/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
make -j4
sudo make install
Here you can compile and install the latest version of GCC. But because the system inside the libstdc++.so.6 inside the/usr/lib64, and we installed in the/usr/local/lib64 inside, so need to update the link.
sudo rm /usr/lib64/libstdc++.so.6
sudo ln -s /usr/local/lib64/libstdc++.so.6.0.18 /usr/lib64/libstdc++.so.6
Then reopen the qtcreator and it will work.
Finally, we compiled our own Qt library in/usr/local/trolltech/qt-4.8.5, which needs to be specified in the Qtcreator option.
If you use Qtcreator to open the Wiznote project and compile it, please refer to the article: compiling wiznote Qt Project under Ubuntu
Compile Wiznote Qt Project under CentOS