How do I link my math h to GCC?

How do I link my math h to GCC?
Answer
If you are going to compile a C program with math.h library in LINUX using GCC or G++ you will have to use –lm option after the compile command. -o is an option to specify the output file. xyz is the name of the output file. -lm is an option to link againt the math library (libm).
 

Tìm kiếm

Back
Top