Puxi, president of Harvard University, once profoundly pointed out that whether a person has the ability to innovate is a watershed between "first-class talents and third-class talents. Recently, I have been busy developing programs on linux servers. it is necessary to use QT for Development. the essence is to use the program code written by others and use it directly in my own program. This is also the core implementation value of QT, allowing you to focus on the business itself rather than writing the code itself. Based on the above ideas, install QT on centos6.4 and use the industry to quickly compile the server program
Puxi, president of Harvard University, once profoundly pointed out that whether a person has the ability to innovate is a watershed between "first-class talents and third-class talents.
Recently, I have been busy developing programs on linux servers. it is necessary to use QT for Development. the essence is to use the program code written by others and use it directly in my own program. This is also the core implementation value of QT, allowing you to focus on the business itself rather than writing the code itself.
Based on the above ideas, install QT on cent OS 6.4 and use the industry to quickly write server programs.
Cent OS is a very stable system. to ensure stability, the programs and dynamic libraries used in the system are also relatively old. it is not difficult to install QT itself, as long as the version dependency on the dynamic library is minimized, the requirement is met.
1. upgrade GCC
1. the GCC upgrade solves the GLIBCXX_3.4.15 & not found problem.
Upgrade GCC to 4.8.2. first download the dynamic library of the new version: gcc 4.8.2.
2. decompress the installation package and enter the decompressed folder.
|
Cd gcc-4.8.2 // download the dynamic library required for compiling. /contrib/download_prerequisites // return to the path where the decompression folder is located. I decompress the package to cd under tmp .. // create a folder gcc-bulid-4.8.2mkdir gcc-bulid-4.8.2 in/tmp |
3. Compile and install
|
Cd/tmp/gcc-build-4.8.2 // configure/tmp/gcc-4.8.2/configure -- enable-checking = release -- enable-languages ages = c, c ++ -- disable-multilib // start compilation, specify four CPUs for compilation, save time make-j8 // after 20 minutes (low computer configuration, haha) make install |
4. replace the original GC
|
// Generally, in/usr/local/bin, ls/usr/local/bin | grep gcc // you can see the new GCC // run the following command, use the new GCCupdate-alternatives -- install/usr/bin/gcc/usr/local/bin/x86_64-unknown-linux-gnu-gcc 40 // use libstdc ++ under usr/local/lib64. so.6 replace libstdc ++ in usr/lib. so.6cp usr/local/lib64/libstdc ++. so.6/usr/lib64 // Check the gcc-v // The version 4.8.2 is found. The installation is successful. |
2. install QT
1. install the dependent Library
1. install Qt 4.8.5
|
Cd/tmpgunzip qt-everywhere-opensource-src-4.8.5.tar.gztar xvf qt-everywhere-opensource-src-4.8.5.tar cd/tmp/qt-everywhere-opensource-src-4.8.5./configuremakemake install |
2. set the environment variables of QT
|
//. Profile, add PATH =/usr/local/Trolltech/Qt-4.8.5/bin: $ PATHexport PATH |
3. install QT creator
|
/Qt-creator-opensource-linux-x86_64-3.0.0.run |