Introduction to GCC
In Linux, GCC (GNU ccompiler) is a powerful and superior multi-platform compiler launched by GNU. It is one of the representative works of GNU. GCC is a super compiler that can compile executable programs on multiple hardware platforms. Its execution efficiency is 20% higher than the average efficiency of general compilers ~ 30%.
The
GCC and Linux are excellent combinations. Although they are independent software, Linux relies entirely on GCC to run on the new architecture. Linux also utilizes the features in GCC (calledExtension) To achieve more functions and optimization. This article discusses some important extensions and explains how to use them in the Linux kernel.
The current stable
1. Download arm-linux-gcc-3.4.1.tar.bz2 to any directory and download it to my personal folder/home/WRQThe arm-linux-gcc-3.4.1.tar.bz2 is as follows: http://www.handhelds.org/download/projects/toolchain/arm-linux-gcc-3.4.1.tar.bz2
2. Extract arm-linux-gcc-3.4.1.tar.bz2# Tar-jxvf arm-linux-
forget the one before WQ :)
The GCC command is used for compiling. First, you must be familiar with the usage of GCC commands.
GCC commands provide many command options, but not all of them should be familiar with them. You can master several common options at the beginning, and then learn other options later, in this case, too many options may affect your lear
Document directory
-M
-MM
-S
-E
-C
-Include file
-Dmacro is equivalent to # define macro in C.
-Dmacro = defn is equivalent to # define macro = defn in C.
-Umacro is equivalent to # undef macro in C.
-Undef undefines any non-standard macros
-X language filename
-X none filename
-Pipe
-Ansi
-Fno-asm: This option is part of the feature that implements the ansi option. It prohibits the use of asm, inline, and typeof as keywords.
-Fcond-mismatch: the second and third parameter type
Understanding of GCC, libc, and other related concepts
1. GCC (GNU collectCompiler) is a group of compilation tools. It mainly completes "preprocessing" and "Compilation" tasks, and provides support for runtime libraries closely related to compilers, such as libgcc_s.so and libstdc ++. So.
GCC (gnu c) in LinuxCompiler) is a powerful and superior multi-platform co
Differences and relationships between GCC and G ++
Both GCC and G ++ are GNU compilers.
1. For Files suffixed with. C, GCC treats it as a C program; G ++ treats it as a C ++ program;
2. For files with the. cpp suffix, both GCC and G ++ will be treated as C ++ programs.
3. In the compilation phase, G ++ calls
Now gcc is 4.7.1. First install gcc:
1. Download gcc-4.7.1-20120825.tar.bz2, decompress the package, you also need to download and install libgmp3-dev libmp fr-dev libmp C-dev flex bison zlib readline automake autoconfig cmake zlib1g-dev many software in your aptitude install build-essential kernel-package and other inland river compiling environments that are al
Preface:
The last time I upgraded GCC 4.7.2 on CentOS 6 (), many things have not been studied due to my limited capabilities and time constraints, as a result, there are some redundant and incorrect or uncommonly used parts in the tutorial. (I was also told by my sister that I misled her, so I am wronged.) I apologize to everyone.
This time I updated gcc on Ubuntu 12.04 LTS 64-bit edition and found some ori
Ubuntu gcc error: References not defined for functions such as ' log 'A.c#include #include int main (){float A;void Print_logarithm (double);printf ("Enter a num:");scanf ("%f", a);Print_logarithm (a);return 0;}void Print_logarithm (Double x){if (x{printf ("Positive numbers only,please.\n");Return}printf ("The log of X is%f", log (x));}Ubuntu GCC Compilationdirect command
Multiple GCC versions of LINUX-general Linux technology-Linux programming and kernel information. For details, refer to the following section. I am currently using UBUNTU 8.04. Because I have been upgrading LINUX recently, my GCC is also getting higher now, which is 4.2.3. The following prompt appears when I compile the CROSSTOOL on hand:
Checking for a BSD-compatible install.../usr/bin/install-c
Checking
2018-01-12 19:10:42using the GNU compiler-GCC compiler under Windows1, MinGW (minimalist GNU on Windows) Compilation tool IntroductionMinGW is a compilation environment that uses only free software to generate pure Win32 executables , which is the minimalist (simplified) GNU on Windows merchants.Windows ported version of GCC on unix-like system: MinGW compilation System/ToolsIn fact, MinGW is not a simple C
MTK may be incompatible when detecting GCC, leading to failure to detect GCC and the GCC unkown error. The following operations are performed during gcc nv detection (CodeFor details, see mediatek/build/tools/checkenv. py function gcccheck .) :First, execute the GCC -- V com
When we compiled C + + code, some people use GCC, some people use g++, so all kinds of statements come, such as C code with GCC, and C + + code with g++, or compiled with GCC, link with g++, for a moment I do not know which statement is correct, if you encounter the last extern "C", There are more differences, and here I want to finish, after all, the purpose of
GCC User Manual
[Reprinted] GCC user manual Chinese Version
Author: Clock1. Preface
The GCC Manual (GCC manual) version is very comprehensive and well-structured, but there is no Chinese version. I read the main contents of the GCC compiler this time, I have a structural un
Today, I encountered a problem that is quite difficult. On centos, I used yum to install the compiling environment and run:
Yum-y install make gcc-c ++ kernel-devel m4 ncurses-devel openssl-devel
As a result, the compilation cocos2d-x has an error:
cc1plus: error: unrecognized command line option "-std=c++11"
I Googled and confirmed that this error was caused by a low gcc version.
View the
Compile and install GCC 5.1.0 in Linux
Compiling C/C ++ programs in Linux naturally lacks an excellent compiler, and GCC is a common tool in Linux. In late April 2015, GCC also came out of version 5.1.0, providing better support for C ++ 11/14. Since I recently studied OpenMP, Gcc-5.1.0 supports the latest OpenMP4.0 ve
GNU, GCC, G ++ compiler in Linux1. GNUGNU is the abbreviation of "GNU's Not Unix". Stallman announced that GNU should be pronounced as Guh-NOO to avoid confusion with the word "new" (note: in English, Gnu stands for the African Impala. Its pronunciation is the same as that of new)To ensure that the GNU software can be freely used, copied, modified, and released ", all GNU software grants all rights to anyone in a copy of the terms of the agreement, GN
Solution to installation failure of vmwarw.lsgcc in gcc environment under RHEL6 (common method ). Recently in tossing RedHat, the version I installed is rhel-server-6.1-x86_64. RHEL6.1 does not have the gcc and gcc-c ++ environments by default. You can only find a local installation method. The following is a summary: The ultimate method: reinstall. When selectin
Installing gcc on RedHat is free of charge. You have read several methods on the Internet, and all of them are final. The installation was successful. I wrote an article to share it. Background: Download The RedHatEnterpriseLinux5 CD image from the Internet, put the image file on disk D, and then install RedHat directly from the hard disk. After the installation is complete, install gcc again. In fact, ther
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.