On 06/04/2012 07:31 PM, Alan Corey wrote:
man intro (3) comes close in OpenBSD (I did man -k libraries to find it)
It just seems like if a function requires a special library that
should be mentioned in the function's man page as well as the header
file since it needs both to work. I guess it depends on how surprised
you are that the function isn't built-in. round() at least is
perfectly ordinary in Pascal/Delphi and in Java/Javascript it might be
something like math.round().
Alan
On 6/4/12, Anthony J. Bentley<anthonyjbent...@gmail.com> wrote:
Alan Corey writes:
They probably aren't broken, looks like I need to link in some library. I
get "undefined reference to" when I try to compile/link. Shouldn't this
be mentioned in the man page?
FreeBSD has a "Library" section in its man page:
LIBRARY
Math Library (libm, -lm)
I recall reading on the mandoc mailing lists that OpenBSD man pages do not
contain this section, but I don't know why that is.
--
Anthony J. Bentley
what are you looking for?
$man round
SYNOPSIS
#include <math.h>
$man math
DESCRIPTION
These functions constitute the C math library, libm. The link editor
searches this library under the ``-lm'' option. Declarations for these
functions may be obtained from the include file <math.h>.
seams well documented to me.
however I had a similer problem with a program built with
djgpp(dos gcc) that had libm built in(auto included, I am not sure)
which had me confused as to whay it was not building on obsd.
just needed the -lm