top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Which compiler switch to be used for compiling the programs using math library with gcc compiler?

+1 vote
387 views
Which compiler switch to be used for compiling the programs using math library with gcc compiler?
posted Jul 1, 2016 by Mohammed Hussain

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

when you compile your program with gcc on linux which uses math library use -lm option. See this command:

gcc -o filename filename.c -lm
answer Jul 2, 2016 by Shivam Kumar Pandey
Similar Questions
0 votes

Can I use gcc as well as java compiler on a single desktop?

0 votes

I am looking for detailed description of optimization flags that are provided by GCC compiler ?

+2 votes

Can Anyone write the C program without using Arthimethic operators for Math table?

+2 votes

I am getting following error when compiling my program with gcc version 4.9.0

gcc --version
gcc (GCC) 4.9.0 20131023 (experimental)

Error

./A.out: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./A.out)

But I gcc 4.7.3 is fine. Any guess why this may be happening.

...