See gcc(1) Linux and Unix man page for more information. The syntax is as follows if the source code is in several files (such as light.c, sky.c, fireworks.c):Ĭc light.c sky.c fireworks.c -o executableĬ++ syntax is as follows if the source code is in several files: G++ fireworks.C -o executable -lX11 How do I compile a program with multiple source files? The syntax is as follows when need pass the -lX11 option with gcc to link with the Xlib libraries: The syntax is as follows when need pass the -lm option with gcc to link with the math libraries:Ĭc myth1.c -o executable -lm How do I compile a C++ program that uses Xlib graphics functions? G++ -O -Wall input.C -o executable How do I compile a C program that uses math functions? G++ -g -Wall input.C -o executable How do I generate optimized code on a Linux machine? demo2 How do I generate symbolic information for gdb and warning messages?
0 Comments
Leave a Reply. |