From owner-freebsd-current@freebsd.org Thu Oct 26 13:39:04 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D17D1E49D15; Thu, 26 Oct 2017 13:39:04 +0000 (UTC) (envelope-from mack@macktronics.com) Received: from borg.macktronics.com (gw.macktronics.com [209.181.253.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD2DC7E691; Thu, 26 Oct 2017 13:39:04 +0000 (UTC) (envelope-from mack@macktronics.com) Received: from pandora.local (olive.macktronics.com [209.181.253.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by borg.macktronics.com (Postfix) with ESMTPS id 373F2882; Thu, 26 Oct 2017 08:29:36 -0500 (CDT) From: Dan Mack To: Steve Kargl Cc: blubee blubeeme , FreeBSD Ports , FreeBSD current Subject: Re: can't link against math.h References: <20171026022332.GA2292@troutmask.apl.washington.edu> Date: Thu, 26 Oct 2017 08:29:35 -0500 In-Reply-To: <20171026022332.GA2292@troutmask.apl.washington.edu> (Steve Kargl's message of "Wed, 25 Oct 2017 19:23:32 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Oct 2017 13:39:04 -0000 % man 3 exp | NAME | exp, expf, expl, exp2, exp2f, exp2l, expm1, expm1f, expm1l, pow, powf, | powl - exponential and power functions gives a good summary as well. Dan Steve Kargl writes: > On Thu, Oct 26, 2017 at 10:05:00AM +0800, blubee blubeeme wrote: >> I wrote a simple test program to test and see if math.h has the function: >> exp10f >> #include >> >> int main(int argc, char** argv) >> { >> (void)argv; >> return ((int*)(&exp10))[argc]; >> } >> >> tried compiling it with clang: >> clang++ test.cpp -o test -lm >> test.cpp:7:17: error: use of undeclared identifier 'expf10' >> return ((int*)(&expf10))[argc]; >> ^ >> 1 error generated. >> >> tried with gcc: >> gcc test.cpp -o test -lm >> test.cpp: In function 'int main(int, char**)': >> test.cpp:7:17: error: 'expf10' was not declared in this scope >> return ((int*)(&expf10))[argc]; >> >> Does FreeBSD math.h have expf10 and if so, how do I link against it? > > No. You could answer this question with a simple grep on math.h. > > Which C standard specifies exp10f or expf10?