Linux.com

Author Message
Joined: Aug 01, 2008
Posts: 1
Other Topics
Posted Aug 01, 2008 at 8:40:36 PM
Subject: Compiling C on Solaris 5
I'm trying to compile a C program on a Solaris 5 system but I keep getting an error for the 'sqrt' function. I have include math.h in the file and there are no syntax errors on the line as far as I can see. Any ideas?
Back to top Profile Email Website
tophandcwby
Joined Apr 10, 2008
Posts: 81

Other Topics
Posted: Aug 02, 2008 8:11:31 AM
Subject: Compiling C on Solaris 5
Try putting -lm in the gcc comand line. See http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Link-Options.html#Link-Options
Back to top Profile Email Website
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya