Generally use GCC compiler
1. Head file icon CONIO.H should become CURSES.H
2. No ITOA functions ITOA? No, there is no such function at all in standard C / C . Even if some compilers under the Windows platform provide this function [3], there is no transplantability, but only the int type (perhaps other functions can also solve the type of long, unsigned long), how is the floating point type? do? Of course, the way is still there, that is: Sprintf.
Char S [100]; Sprintf (s, "% f", 123.123456);
3. About SQRT, SIN and COS functions are incorporated into the Math.h header file, nor does SQRT, SIN, and COS functions. You should be solved with a link library. Sometimes we use a function, but we don't know the name of the library. What should I do this time? I am sorry, I don't know the answer for this question. I only have a stupid approach. First, I went to the standard library path. Look for a library that is related to the function I use, I found the libctor file (libpthread.a). Of course, if I can't find it, there is only one stupid method. For example, I am looking for SiN This function is located. You have to use the nm -o /lib/*.so|grep sin> ~ / sin command, then look at the ~ / sin file, go to it. In the SIN file, I will find this. One line of Libm-2.1.2.so:00009fa0 w SIN, I know SiN in the libm-2.1.2.so library, I can use the -lm option (remove the previous lib and the back version sign, There is still M. So it is -lm).
4. Makefile The error caused by Missing Separetor is that the command line below the target declaration must be separated by the Tab key (instead of space)
PG: pg.o [tab key] gcc -o pg -o -O2 -LM /LIB/ld-2.2.93.so pg.opg.O: pg.c PointGroup.h [Tab Key] gcc -c -c-c -O2 pg.cclean: [Tab key] RM -F * .O
5. Note that when the file DOS format character is debugging, you should pay attention to the file may have a DOS format character. You must first remove DOS format characters in the file: Tr -d
Attached: ********************************************************** ******* GCC common command line list ******************************************************* ***************** http: //www.chinaunix.net author: wayne168 Posted: 2003-04-19 16:02:55
-o file specifies the output file name, which is not necessary when compiling as a target code. If File is not specified, the default file name is A.out.
-c only compiled without link
-Dfoo = BAR Defines the pre-processed macro foo in the command line, its value is BAR
-IDIRNAME adds DIRNAME to the list of search directories in the header file
-LDirName Adds DIRNAME to the list of search directories in the library file, default GCC link sharing library
-static link static library, execute static links
-LFOO Links to Libfoo
-g In executable program contains standard debugging information
-ggdb contains only GNU Debugger to make two information in the executable.
-O Optimize the compiled code
-On specified code optimization level is n, o <= n <= 3
-ansi supports ANSI / ISO C standard syntax, cancels part of the GNU's syntax extension with this standard (but this option does not guarantee generation of ANSI-compatible code)
-pedantic allows all warnings listed by ANSI / ISO C-standard -pedantic -rrors allow all errors listed by ANSI / ISO C standards
-traditional supports Kernighan & Ritchie C syntax (such as using old grammar definition functions); if you don't know the meaning of this option, there is no relationship.
-W Close all warnings, do not use this item
.Wall allows all useful warnings that GCC to provide, or use -w (warning) to mark the specified warning
-werror converts all warnings to errors to stop compiling the compilation process during warning
-Mm outputs a Make compatible list -V
Show commands used in each step of the compilation process