From owner-freebsd-ports@freebsd.org Thu Oct 26 08:47:26 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 A51F4E42736 for ; Thu, 26 Oct 2017 08:47:26 +0000 (UTC) (envelope-from rde@tavi.co.uk) Received: from kipling.tavi.co.uk (kipling.tavi.co.uk [81.187.145.130]) by mx1.freebsd.org (Postfix) with ESMTP id 6113871B89 for ; Thu, 26 Oct 2017 08:47:26 +0000 (UTC) (envelope-from rde@tavi.co.uk) Received: from kipling.tavi.co.uk (localhost [127.0.0.1]) by kipling.tavi.co.uk (Postfix) with ESMTP id 10F07892C3 for ; Thu, 26 Oct 2017 09:41:56 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=tavi.co.uk; h=date:from:to :subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=selector1; bh=INZ5Qz0 QTRU7a+Bwv83OpiQbHgc=; b=W79Oyr3fm7ShFLegwO77p4ZGFjVqFornK5Lmi1z 4CtDaVcr4IAFSmfO0SpvVdSDOhGvmF4V/yWQRV6xtuNkaTAKQSfJW+qbtiztiMSy oHlxo0aoxSvjHSwKrJV2mOUeCPEJvXRNUXQiJ4heMasiWIBdIFfbw8tdkLH8BYKn 8sXE= Received: from raksha.tavi.co.uk (raksha.tavi.co.uk [81.187.145.139]) (Authenticated sender: rde@tavi.co.uk) by kipling.tavi.co.uk (Postfix) with ESMTPA id D0385892BB for ; Thu, 26 Oct 2017 09:41:55 +0100 (BST) Date: Thu, 26 Oct 2017 09:41:55 +0100 From: Bob Eager To: freebsd-ports@freebsd.org Subject: Re: can't link against math.h Message-ID: <20171026094155.39fb5f14@raksha.tavi.co.uk> In-Reply-To: References: X-Mailer: Claws Mail 3.15.0 (GTK+ 2.24.31; i386-portbld-freebsd11.0) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUwXjFLc0vD0cS7y7zw9PDZ4tkWSRaVrZZ+m39qi2tXfVj////7+/utwK4IPggAOAAJUUA7AAABKklEQVQ4jWPYjQMwDFYJp0NKEKCNJmEf9h8CsimXiL2e33s3/e7F7K2Cs3f3dCMkQkMKj4YuCY3K3iR+e7fMaiSjvkX0/5cFGrWpe2uLzOpaExUVqMS/8PX/Re5ey960OLBTZpFA8+IlSBKPQ92zNyUUBsosN58uIY0k8f+/ONCoYytkVuhWzVwNkYiYbqk5M3NmOVBi41YZ8RsGF7shEtFb5KJ3r969CyixM7OTPeFUxG2IxLO8/9/SvqXlc+/x3h295YzLlj2nIRJQj//nRvc5TEIal8RsXBLVuCQwIgoq/u80DomP6HEOk/iOS+IJLonZOCT+ReOQ+Lkbh0QKLonbOCR+7MYhsRqHBJrVcIl/1TgklqKLQyQ+tGKIgyQOqXpjig94diZRAgAXmDX6jyWafAAAAABJRU5ErkJggg====== MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 08:47:26 -0000 On Thu, 26 Oct 2017 10:05:00 +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? It's not in the C standard (C99 or C11). So why would it be available?