From owner-freebsd-ports@freebsd.org Thu Oct 26 02:48:50 2017 Return-Path: Delivered-To: freebsd-ports@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 57862E383B3; Thu, 26 Oct 2017 02:48:50 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A7E1673AD; Thu, 26 Oct 2017 02:48:50 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id v9Q2NWqv002322 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 25 Oct 2017 19:23:32 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id v9Q2NW15002321; Wed, 25 Oct 2017 19:23:32 -0700 (PDT) (envelope-from sgk) Date: Wed, 25 Oct 2017 19:23:32 -0700 From: Steve Kargl To: blubee blubeeme Cc: FreeBSD Ports , FreeBSD current Subject: Re: can't link against math.h Message-ID: <20171026022332.GA2292@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Oct 2017 02:48:50 -0000 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? -- Steve