(Reprinted) GCC and OBJ files, dynamic link files and elf files
--------------------------------------------------------------------------------1. OBJ file Programmers write programs by writing a binary file. If we declare a variable char C, that is, the Declaration requires an 8-bit space, then we need to declare to t
Organize the problems related to the search path of header files and library files in the GCC compilation of LinuxCategory: makefile/make/gcc/ld2010-11-20 23:15 535 people read reviews (0) Favorite reportsTransfer words: This article details the GCC compile-time Search heade
1. OBJ fileProgrammers write programs by writing a binary file. If we declare a variable char C, that is, the Declaration requires an 8-bit space, then we need to declare to the system that the 8-bit space is reserved. How can we do this? It is to compile a special binary file-OBJ file. The execution file obtained by using the C language compiled by GCC contains not only CPU commands, but also a lot of other information, it has many coff, elf ...... I
compile the file. For example:
. ZZ:
z-compile-input%i
It means: any to '. The input files at the end of ZZ will be processed using the ' Z-compile ' program and will be invoked using the-input switch and the '%i ' replacement result (see below) as the command-line argument.
As the content o
I. header filesFind the required header file during GCC Compilation:※The search starts with-I.※Find the GCC environment variable c_include_path, cplus_include_path, objc_include_path.※Find the specified directory./Usr/include
/Usr/local/include/Usr/lib/GCC-lib/i386-linux/2.95.2/include/Usr/lib/GCC-lib/i386-linux/2.95
effect, but the longer the Compilation Time.
Ii. Multi-source file Compilation Method
If there are multiple source files, there are basically two compilation methods:[Assume there are two source files: Test. C and testfun. C]
1. Compile multiple files togetherUsage: # GCC testfun. C test. C-o TestPurpose: Compil
; A.I-----> A.S------> A.O-------> A.outPretreatment: Gcc-e a.c-o A.ICompile to assembly code: Gcc-s A.i-o A.S, generate assembly file. SCompilation: Gcc-c a.s o A.o,gas Assembler is responsible for compiling it as a target fileLink: gcc a.o-o a GCC connector is provided by
In Centos, the English language is changed to Chinese and gcc, g ++, gdb, and input method are installed.
For Linux (centos) installation (here my version is 6.5 ):
1. How to change English to Chinese:
In root mode:
Run the following command:
The following content is displayed after running:
Then change LANG = "en_US.UTF-8" to LANG = "zh_CN.UTF-8" and then wq save and exit;
If wq is correctly saved, rest
Tags: win SSI BSP Obs following mis dir been sourceThis question has been bothering me for almost two days, obviously installed the ARM-LINUX-GCC, and the system variables and user variables are configuredBut each time you enter Arm-linux-gcc-v, you will see an error title shown. Finally after checking a post there is said to be because the use of Ubuntu is 64-bit reason,You need to enter sudo apt-get insta
".
Some people may say, "In this case, add 'fflush (stdin); 'to the scanf function to clear the input buffer. Isn't that enough ?"However, this is wrong!Fflush (stdin) has never been defined in the C and C ++ standards ).Some people may say, "but I used fflush (stdin) to solve this problem. How can you say it is wrong ?"Indeed, some compilers (such as vc6) support using fflush (stdin) to clear the input bu
the following text file:Called Makefile under Linux#这里可以写一些文件的说明MYFIRST:MYFIRST.O hello.og++ MYFIRST.O Hello.o-o MyfirstHello.o:hello.cppg++-C Hello.cpp-o hello.oMyfirst.o:myfirst.cppg++-C Myfirst.cpp-o MYFIRST.OMakefile Writing rules:(1) Comment on behavior starting with "#"(2) file dependencies are:Target:componentsRuleSave for Myfirst, in the terminal input: Make myfist, the program has been wrong but all the programmers common enemy, in writing t
to "Simplified Chinese."[GCC (Fedora), BOM, Chs]:fedora 17 comes with the GCC 4.7.0, the source code using signed UTF-8 encoding, the system language is set to "Simplified Chinese."[GCC (Fedora), Nobom, Eng]:fedora 17 comes with GCC 4.7.0, the source code uses unsigned UTF-8 encoding, and the system language is set to
code uses signed UTF-8 encoding, the system language is set to "simplified Chinese ".[GCC (Fedora), nobom, Eng]: fedora 17 comes with GCC 4.7.0, source code uses non-Signed UTF-8 encoding, the system language is set to "English ".[GCC (Fedora), BOM, Eng]: fedora 17 comes with GCC 4.7.0, source code uses signed UTF-8 e
The number of files required by gcc-general Linux technology-Linux programming and kernel information. The following is a detailed description. I want to put a gcc system that can compile the basic C program on a small system, so that I can use the minimum system or compile some small programs if necessary, so I did the following work:
Copied the following
In linux, GCC files are compiled together-general Linux technology-Linux programming and kernel information. The following is a detailed description. Do you know how to compile a few files with gcc? If you don't know, you can take a look. If you know, please give me some advice. This is a teacher's class exercise, the
Article title: install GCC and its header files in the Ubuntu network environment. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems and open source, and other basic categories 1. configure GCC
Just installed GCC can not co
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.