Today, Rad Hat 9.0, I feel very good, the interface is getting closer to the WIN style, it is very intimate, huh, huh. The first thing is of course configuring TCP / IP. It is very simple, and there is no difference in Windows, there is no extraordinary IP Addresss, Submask Address, Gateway Address, is very simple. You can do it online. What is the stuff, the buddy is online. LINUX The default compressed format is: tag, gz, zip, the tool with the system is extracted to decompress OK, but the online is more RAR format, so the urgency is of course the next decompression software. So I found a Linux version of Rar. There is only RAR (compressed files), unrar (unzip file) and other parts after installation. In directory of RAR, UNRAR, COPY to / USR / BIN, is to run compression and decompression commands directly under the shell. The only difference in Windows is compressed, unzipped is Command line, but don't be afraid, the command is helpful, and the cumbersome parameters are in front of the help!
Hey, think about what we need now? By the way, I got Linux, I can't do GCC, haha. Going to Down is OK! Now I know the benefits of Linux, and the FREE's Dongdong is :). It's just fine with Emacs, this IDE is really good, supporting a lot, you are so good. Waiting for these, Hello Linux is born! Ha ha. Code, simple, no need to waste the layout here. However, the parameters of GCC have a lot of parameters, so give everyone a good thing, put the GCC parameters, there is a reference when Down is going to use, remember the commonly used several. OK. Write so much first, the part below is made, the key! The essential! :)(to be continued)
Here is the GCC parameter [turn], put it together, you can check it yourself.
GCC parameter details
[Introduction] GCC and G is a GNU's C & C compiler
GCC / G requires 4 steps when performing compilation
1. Preprocessing, generates .i file 2. Files that the pre-processed file does not convert the pre-processed file into assembly language, generate files .s 3. There is a compiled change to target code (machine code) generation .o file 4. Connection target code Generate an executable program
[Parameter Detailed] -X Language FileName Set the language used by the file, makes the retrore name, which is valid for the future. That is, based on the suffix name of the convention C language, and C suffers are .c Or .cpp, if you are very personal, determine your C code file's suffix name is .pig haha, then you will use this parameter, this parameter works on his file name, unless the next parameter is used. . The parameters you can use have these `c ',` Objective-c', `c-header ',` C ', `cpp-output ',` assembler', and `assembler-with-cpp '. See English should be understood. Example usage: gcc-xc hello.pig -x none filename turned off the previous option, that is, let GCC automatically identify file type example usage: gcc -xc hello.pig -x none hello2.c -c only Activate pretreatment, compile, and compile, that is, he only makes the program into an OBJ file example: gcc -c hello.c He will generate .o Obj file -s only activation pre-processing and compile, means compiling files Become a assembly code. Example GCC -S Hello.c He will generate .S assembly code, you can use the text editor to see
-E only activates pre-processing, this does not generate files, you need to redirect it into an output file. Example usage: gcc -e hello.c> Pianoapan.txt gcc -e hello.c | more slowly, A Hello Word also wants to process the code to be 800 lines
-o Develop a target name, the default, the file compiled by the GCC is a.out, it is difficult to listen, if you have the same feeling, change it, haha example gcc -o hello.exe hello.c (Oh, Windows uses habits) GCC -O Hello.asm -s hello.c -pipe uses pipes instead of compiling temporary files, when using non-GNU assembly tools, there may be some questions GCC -PIPE -O Hello.exe Hello.c
-ansi off the characteristics of the ANSI C in GNU C, activating ANSI C's proprietary characteristics (including some ASM Inline TypeOf keywords, and Unix, VAX and other pre-processing macros,
-fno-asm This option implements a part of the functionality of the ANSI option, which is forbidden to use ASM, Inline, and TypeOf as a keyword. -fno-strict-prototype works only to G , using this option, G will be a function that does not have parameters, it is considered that there is no explicit to the number and type description of the parameters, not without parameters. And GCC does not With this parameter, you will have a function without parameters. It is considered that the city has no explicitly instructions. -FThis-is-varialble is in line with traditional C , you can use this as a general variable. -Fcond-mismatch allows conditional expressions The second and third parameter types do not match, the value of the expression will be the four parameters of the VOID type -funsigned-car -fno-signed-char-fsigned-char -fno-unsigned-char, which is set to the char type, decided Set the char type to unsigned char (the first two parameters) or Signed char (the latter two parameters) -include file contains a code, simply, when you use a file, you can need another file. With it, the function is equivalent to using a #include
-undef cancels the definition of any non-standard macro-IDIR when you use #include "file", GCC / G will first find the header file you make in the current directory. If you didn't find it, he returned to the default The header file directory is found, if you use -i to develop a directory, he will look up in the directory you have developed, then go to the regular order. For #include