0% found this document useful (0 votes)
56 views1 page

GCC

This command compiles the C source code file ls1.c into an executable called ls1 for Linux. It includes the header files from the include directory, enables several warnings and definitions, and links against the apue library from the lib directory. A similar command is shown for compiling for MacOS with different predefined macros and the same include, warning, and library options.

Uploaded by

Chiara Rucco
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views1 page

GCC

This command compiles the C source code file ls1.c into an executable called ls1 for Linux. It includes the header files from the include directory, enables several warnings and definitions, and links against the apue library from the lib directory. A similar command is shown for compiling for MacOS with different predefined macros and the same include, warning, and library options.

Uploaded by

Chiara Rucco
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

gcc -ansi -I../include -Wall -DLINUX -D_GNU_SOURCE ls1.c -o ls1 -L..

/lib -lapue
gcc -ansi -I../include -Wall -DMACOS -D_DARWIN_C_SOURCE ls1.c -o ls1 -L../lib
-lapue

You might also like