Reading Note 3 GCC compiler work steps-general Linux technology-Linux programming and kernel information, the following is a detailed description. After compiling the source code of the program, we use the GCC compiler to compile the written source code, although we only see a command, for example, we compile the Hello
Reprint please indicate: http://www.cnblogs.com/winifred-tang94/1. Compilation processGcc–fpic–c xxx.cWhere-fpic is the target code that notifies the GCC compiler to produce a location independent. The link does not go through a copy.2. Link processGcc–shared–o libxxx.so XXX.OA compiled link allows you to generate a dynamic-link library with a. so extension.Eg.You can also
how to see which version of the compiler compiled the LINUX-GCC http://bbs.csdn.net/topics/380000949That is not possible unless you add debug information, which is compiled by adding the-G parameter, and then debugging with GDB can be displayed. View an elf file information to the fullest extent.As follows:[Email protected] rootfs]# Readelf-wa bin/gzipELF header:magic:7f $4c $ on on on xx xx xx xx xx xx
sudo arm-linux-gcc, Because Sudo uses system environment variables rather than user environment variables.
In the last line of the pop-up text editor, enter:
Export path= $PATH:/usr/local/arm/4.3.2/bin
This path to see their own ARM-LINUX-GCC the actual path of the program to modify, some in the Arm/xxxx/usr/bin directory, save closed.
Reboot or logout of the system, in the terminal input arm-linux-
1 The GCC compiler is a compiler on a Linux system, which is a compiler collection, in other words, it compiles C, C + +, Java, Object C, PHP, and many more languages.2 Some common options for the GCC compiler are described belowG
A. Run Gcc/egcsThe most important software development tool in Linux is GCC. GCC is the GNU C and C + + compiler. In fact, GCC can compile three languages: C, C + +, and OBJECTC (an object-oriented extension of the C language). Use the G
Question:
Code optimization double-edged sword,
An error occurs accidentally.
Static in GCC,
Difficult to detect after an error,
If you don't want to cover the road,
Volatile!
Laboratory development of the sensor network node using the AVR series microcontroller circuit board, AVR-GCC provides 5-level code optimization, because the node Running code is more complex, the functions such as routing, networkin
The GNU Compiler family's GCC internal password-Linux general technology-Linux programming and kernel information. The following is a detailed description. GCC User Guide
Syntax:
Gcc [option | 20021312141356.htm]...
G ++ [option | 20034712141356.htm]...
Where option is the option used for
http://blog.csdn.net/u014328976/article/details/46745349GCC compilersGCC hello.c-o Hello #将hello. c compiled into a hello executable fileGCC-E hello.c-o hello.i #将hello. C converted to a preprocessed file hello.iGcc-s hello.c-o Hello. S #将hello. C converted to assembly file hello. SGcc-c hello.c-o hello.o #将hello. C converted to binary file hello.oGcc-i dir hello.c-o Hello #-I followed by path, specifying the dir path to find the header fileGcc-wall Hello.c-o Hello #显示编译过程中所有的警告信息
GCC (GNU Compiler Collection GNU Compilation Tool Collection) enables the C, C + +, and Java languages to be compiled from the source code into binary code, which is a tool.Software dependencies:The author develops a software, needs a function library, this function library already exists in the machine B software of the author at that time, so that a software does not need to repeat development, direct cal
1. Push:
1. GCC is a Linux-based compiler launched by GNU. GCC can compile C, C ++, and assembler programs,
2. in Linux, whether a file can be executed is determined by the file name suffix, but by the file attributes (-x;
3. GCC uses the file name suffix to differentiate the type of the input file. For example:
(1) c
Use gcc to compile a lower-version compiler-general Linux technology-Linux programming and kernel information. For more information, see the following. Use high-version gcc to compile a low-version Compiler
Author: ferlyworld Zhou bohe
Email: zhoubohe@126.com
Source: http://blog.sina.com.cn/ferlyworld
Libstdc +
Installing GCC with YumInstalling with the Yum command is also very easy.yum -y install gcc gcc-c++ kernel-devel //安装gcc、c++编译器以及内核文件Installing GCC manually
Remove the required RPM package from the CENTOS7 system installation image (also available in other ways): Un
The first is to use VC + + tools to learn C + +, learn more on the VC block I see things curious, always want to contact some development environment, today time to explore the Codeblocks this open-source IDE use method, the configuration of the compiler is the MinGW gcc compiler, GCC compiled multibyte set of characte
[Root@localhost one]# gcc--help
USAGE:GCC [options] File ...
Options:
-pass-exit-codes exit with highest error code from a phase
--help Display This information
--target-help Display Target specific command line options
--help={target|optimizers|warnings|params|[ ^]{joined|separate|undocumented}}[,...]
Display specific types of command line options
(Use '-V--help ' to display command line options of sub-processes)
--version Display
C99version ofCthe language introducedinlinekeyword start supportinlinefunction, before which the traditionalCLanguage (C89) is notinlinekeyword, nor does it supportinlinefunction. But mostC89the compiler willinlineas an additional feature, it was added in early. GCCIt's no exception, butGCCIncreaseinlinefeature whenC99It's not finalized yet.GCCininlinethe Semantics andC99There is a slight difference. Here's the main point.GCCin theinlinefeature. In ad
Take fruit and Apple as an example to analyze:Fruit and Apple are defined as follows:By testing in two compilation environments (GNU GCC VS2015), you can see that the object model of both compilers is the same, as shown in:Apple is a subclass of fruit, which is a two-level single-chain inheritance structure. Within Apple and fruit objects, the following principles are followed:
The first member of an object is a virtual pointer to a virtual
, otherwise it is impossible to compile (seemingly unreasonable thing, is the C + + standard has changed.) )// C + + There seems to be no such practice in the standards, and there is no mention in the books related to this .Public:Postorderiter ( const binarytree~postorderiter () {}void A (); Locate the first node in the sequencevoid operator+ + (); Locate the next node in the orderprotected:stack};Template class type>Postorderiterconst binarytreeSt. Push (StknodeIn this function, you must use t
C ++ Object Memory Layout-GCC compiler-virtual inheritance of multiple base classes
// GCC compiler -- virtually inherits multiple base classes. cpp // 2010.8.18 // The object size of the GCC compiler is much smaller than that of
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.