I am having a hard time getting Ubuntu's gcc to understand the long double-manipulating functions from math.h, namely sqrtl, cabsl and cexpl. The message I get for all of them when compiling is
undefined reference to `sqrtl'
Is there any flag other than -lm that I have to put on the command line for gcc to understand these functions? Is it a missing package? Or is this a problem with the version I'm using (4.6.1 on Oneiric)?
libc6-dev? All I can say is this works here:#include <math.h> \n int main() { sqrtl(1); }..cc test.c -o test- I don't even need-lm, it figures it out. – Caesium Nov 30 '11 at 15:02-lmor not. – Sir Whiteout Nov 30 '11 at 15:34long double x;variable and assign a value to it, then callsqrtl (x);the problem I reported appears. – Sir Whiteout Dec 01 '11 at 14:13cc -std=c99. – aquaherd Dec 01 '11 at 18:32