how to use sqrt() in gcc compiler

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • suganya venkat
    New Member
    • Feb 2012
    • 1

    how to use sqrt() in gcc compiler

    i got this error when i run this line
    undefined reference to `sqrt'
    collect2: ld returned 1 exit status
    can u pls help me to correct this error
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    show us the code
    show use the way you invoked the compiler/linker (the command line)

    Looks like you are failing to include the standard libraries in the link somehow.

    Comment

    Working...