Operating System - HP-UX
1834896 Members
2323 Online
110071 Solutions
New Discussion

Reg:How to include library containing rint() function

 
Chandrasekar_2
Occasional Advisor

Reg:How to include library containing rint() function

Hi everyone
I have HP UX 10.2 running on my Visualize C240 workstation. Recently I tried to compile a C program which uses "rint()" function in it. When I compile it using gcc-3.0.4 compiler it gave me the error message saying that rint() function could not be located.
How do I go abt rectifying this problem. Is there a patch available for HP UX 10.2 which can do it? Waiting for ur replies. Thanks
regards
chandrasekar
1 REPLY 1
Olav Baadsvik
Esteemed Contributor

Re: Reg:How to include library containing rint() function


Hi,

I find the function rint in /usr/lib/libm.sl
Make sure that you link in this lib. Usually
this is done by adding -lm to the library-list

Regards
Olav