Linux compiler installation GCC-5.1.0Linux compiler installation GCC-5.1.0
Compiling C/C ++ programs in Linux naturally lacks an excellent compiler, and GCC is a common tool in Linux. In late April 2015,
in Linux are default:Put the header file in the/usr/include/directory.The library files are stored in the/usr/lib/directory.2. GCC must find the required header file and library file in its own way during compilation.-I option can be used to add a new directory to the GCC header file search path.For example, if there is a header file required for compilation in
Note: When Redhat Enterprise Linux 5 was using GCC to compile the first program, it was found that GCC was not installed. Search online to see this post. Then go here to learn. Thank you for sharing the "lone guest" in the blog park. @ The lone guest of the dustAbstraction Red Hat Enterprise 5 does not install GCC by d
CC and GCC in Linux
By Zhou yinhui
Reprinted from: http://www.cnblogs.com/zhouyinhui/archive/2010/02/01/1661078.html
In Linux, CC will be seen later, and GCC will be seen later, which is a bit messy. Are they the same thing? What is the difference?
In two parts:
First, if the scope of discussion is be
The following is a comparison between CentOS5 and FreeBSD9.0: the gcc that comes with CentOS5 is gcc (GCC) 4.1.2. you can use yum to install gcc44 (GCC) 4.4.4FreeBSD9.0 with gcc 4.2.1, you can install gcc4.6 through ports (currently 4. 6 .... the following compares CentOS 5
Tags: string ring Other differences indirect many color HTTP harOne, GNUGNU is the "GNU's not Unix" recursive abbreviation, Stallman announced that GNU should pronounce Guh-noo (slave) to avoid confusion with the word new (note: GNU in English is intended to be the African wildebeest, the same pronunciation as new)In order to ensure that GNU software is free to "use, reproduce, modify and distribute", all GNU software is licensed under the terms of an agreement that authorizes all rights to anyo
Currently, the most common C language compiler in Linux is GCC (GNU Compiler Collection ).
The ansi c standard compilation system can compile programs written in C, C ++, Object C, and other languages. GCC is not only very functional
Powerful and flexible in structure. The most commendable aspect is that it supports various languages through different front-end m
April 20, 2004 the latest version of the GCC compiler 3.4.0 released. At the moment, GCC can be used to compile programs in C + +, FORTRAN, JAVA, OBJC, and Ada languages, and you can choose to install supported languages as needed. GCC 3.4.0 supports the C + + standard better than previous versions. This article introduces the installation process of
3.1 create a dynamic library
Create the file hello. C with the following content:
# Include
Void Hello (void)
{
Printf ("Hello World/N ");
}
Use the command gcc-shared hello. C-o libhello. So to compile it into a dynamic library. We can see that the current directory has an additional file libhello. So.
[Leo @ Leo test] $ file libhello. So
Libhello. So: Elf 32-bit LSB shared object, Intel 80386, Version 1 (sysv), not stripped
As you can see, the file
.
[Leo@leo test]$ gcc Test.c-lhello
/usr/lib/gcc/i686-pc-linux-gnu/4.0.0/.. /.. /.. /.. /i686-pc-linux-gnu/bin/ld:cannot Find-lhello
Collect2:ld returned 1 exit status
[Leo@leo test]$ gcc test.c-lhello-l.
[Leo@leo test]$
The first compilation of direct compilation,
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
The best IDE-SlickEdit-linux Enterprise Application-Linux server application in Linux is described below. 1. Download and search for download. My version is Slickedit v11.0.1.
2. Install the tool. If not, check the instruction file.
3. crack. You can use the binary Editor (ghex) to modify the./bin/vs file in the Slicke
-pedantic compilation option does not guarantee the full compatibility of the compiled program with the Ansi/iso C standard, it can only be used to help Linux programmers get closer to this goal. Or in other words, the-pedantic option can help programmers discover some code that does not conform to the Ansi/iso C standard, but not all, in fact only those cases in which the compiler is required to diagnose in the Ansi/iso C language standard can be dis
Library, the results still did not find the ideal answer. Later speculation is not in the CentOs7 Ld_library_path, but should not, because their own gcc (version 4.8.3) with the operating system does not matter. then re-searched the role of GCC Ld_library_path, actually found that GCC in the compilation link when the link to the dynamic library with the LIBRARY_
test1.c test2.c-o TestIf more than one file is processed at the same time, GCC will still follow the process of preprocessing, compiling, and linking. If you delve into it, the above command is roughly equivalent to executing the following three commands in turn:Gcc-c Test1.c-o TEST1.OGcc-c Test2.c-o TEST2.OGCC test1.o test2.o-o Test4 Error detectionGcc-pedantic Illcode.c-o IllcodeThe-pedantic compilation option does not guarantee the full compatibil
People who may learn QT generally feel that QT's IDE development environment is relatively small and hard to find. In fact, the IDE environment is scarce for Linux development.Here I recommend several good ides:1. kdevelop 3.5, a well-established integrated development environment, supports qt42, monkey studio, http://www.monkeystudio.org/3, edyuk, http://sourcef
The C++11 standard was unanimously adopted in August 2011, the first major revision of the C + + language since 1998, and the improvement and expansion of the C + + language. Subsequently, each compiler manufacturer implements or partially implements the features in C + +.
To see how much support the compiler has for c++11, see the article:
This article mainly describes how to upgrade GCC to support c++11 under
hello.c)Add_executable (Hello ${src_list})It's OK to write set this way, but if you have a lot of source files, adding all the names of the source files will be a chore. A more convenient approach is to use the Aux_source_directory command, which looks for all the source files in the specified directory and then saves the results in the specified variable name. The syntax is as follows: Aux_source_directory (Aux_source_directory (. DIRSRCS)Add_executable (Hello ${dirsrcs})
Learn CMake Please re
Download arm-Linux-GCC tool chain
You can download frequently-used cross-compilation files from the following sites:Http://frank.harvard.edu /~ Coldwell/toolchain/Http://www.kegel.com/crosstool/IFrom: http://hi.baidu.com/zhxubo/blog/item/ee0987b41c66a0748ad4b263.htmlHttp://www.handhelds.org/download/projects/toolchain/Http://ftp.arm.linux.org.uk/pub/arm
compilation option does not guarantee the full compatibility of the compiled program with the Ansi/iso C standard, it can only be used to help Linux programmers get closer to this goal. Or in other words, the-pedantic option can help programmers discover some code that does not conform to the Ansi/iso C standard, but not all, in fact only those cases in which the compiler is required to diagnose in the Ansi/iso C language standard can be discovered a
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.