TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:222] linux libraries



You make sure you linked with -lm for the math libraries?

Quoting W. Kent Treichel (mapman@visi.com):
> This is not exactly a Linux question, but maybe someone has an answer. 
> I have a C program I tried to compile on my Linux box, RH 5.0.  My level
> of proficiency in either C or Linux/Unix is rudimentary at best.  I did
> not write the program but I thought I could figure out how to compile
> it, it seemed rather straightforward.  After attempting to compile the
> program, I received a list of errors.  I wasn't shocked and I think I
> understood most of it.  The errors stated that it couldn't find or use a
> variety of math operators, sin, cos, sqrt, acos, and pow.  I looked
> through the program and found the formulas, then I found math.h on the
> system and it was there.  it seems for some reason that it doesn't like
> the Linux math.h or maybe not.  This program did compile using cc on a
> sun Unix machine.  Incidentally, I also tried compiling on our AIX
> machine and received the same errors.  Thank you for your time and
> consideration.
> -- 
> W. Kent Treichel
> Wilder Research Center
> 1295 Bandana Blvd N. Suite 210
> St. Paul, MN  55108
> (612) 647-4636
> ______________________________
>  
> 1. Always look before you turn.
> 2. Turn right to avoid collisions.
> 3. Lower jumper has the right of way.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@listserv.real-time.com
> For additional commands, e-mail: tclug-list-help@listserv.real-time.com
> Try our website: http://tclug.real-time.com

-- 
Bob Tanner <tanner@real-time.com>       | Phone : (612)943-8700
http://www.real-time.com                | Fax   : (612)943-8500
Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9