, . , UNIX.
UNIX- , , .
.c . (.) ++.
. #include <' >
,
#include <fcntl.h>
' , , . ' , ' .
1
<assert.h> | ̳ assert, |
<cpio.h> | ̳ cpio |
<ctype.h> | ̳ , |
<dirent.h> | ̳ , |
<errno.h> | ̳ |
<fcntl.h> | ̳ fcntl, open, creat, , |
<float.h> | ̳ , |
<ftw.h> | ̳ , , |
1
<grp.h> | ̳ , |
<langinfo.h> | ̳ , , langinfo() |
<limits.h> | ̳ , |
<locale.h> | ̳ , , |
<math.h> | ̳ |
<nl_types.h> | ̳ , catopen catclose |
<pwd.h> | ̳ , |
<regex.h> | ̳ , , |
<search.h> | ̳ , , |
<setjmp.h> | ̳ , ' |
<signal.h> | ̳ , |
<stdarg.h> | ̳ , |
<stddef.h> | ̳ |
<stdio.h> | ̳ - |
<stdlib.h> | ̳ |
<string.h> | ̳ |
<tar.h> | ̳ , |
<termios.h> | ̳ . - |
|
|
1
<time.h> | ̳ , , , |
<ulimit.h> | ̳ ulimit() , |
<unistd.h> | ̳ , |
<utime.h> | ̳ utime |
<sys/ipc.h> | ̳ , 䳿 (IPC) |
<sys/msg.h> | ̳ , IPC () |
<sys/resource.h> | ̳ , |
<sys/sem.h> | ̳ , IPC () |
<sys/shm.h> | ̳ , IPC( ') |
<sys/stat.h> | ̳ , |
<sys/times.h> | ̳ times(), |
<sys/types.h> | ̳ |
<sys/utsname.h> | ̳ uname(), |
<sys/wait.h> | ̳ , |
, - , , , .
Linux C\C ++ GNU C\C++.
UNIX pcc ( ) gcc - GNU Compiler Collection - ( ).
gcc:
− .
− gcc .
− gcc .
Unix .
gcc:
gcc ,
info gcc
:
2
-c | ҳ . ' name.o. . |
-o file-name | file-name ' gcc ( , ,). |
-llibrary-name | . |
-v | gcc, |
-g | sdb(1). : -g . |
-O | ' , , ' . |
2
|
|
-S | . .s. , "" '. |
:
,
gcc '__
, , , ' a.out. ' , , , -o:
gcc '__ -o '_ _
,
Gcc file.c -o file.exe gcc -o file file.c
:
./file
, F.cc, ' F.o, :
gcc -c <compile-options> F.c
compile-options .