From owner-freebsd-ports@freebsd.org Thu Oct 26 08:49:46 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 B83DEE42806 for ; Thu, 26 Oct 2017 08:49:46 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F04171C79 for ; Thu, 26 Oct 2017 08:49:46 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-io0-x22a.google.com with SMTP id j17so3894971iod.5 for ; Thu, 26 Oct 2017 01:49:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Vp9Yxw66Ogfudml53M3Tp8pFsKIbEDDKn6lCpMQIUN0=; b=EBu2OtsDhFyEEA5T8RpsfpPIGawYq6BJbovQWMXk0m+lhZg4UD8bEspl4XMwR0Phco 6/qZ5OQ3H9lPdnGMdCtxQVtx9S6lgYb/0Q/IuFG8tKT1zCX+DAsbjKNiN4FkF+hxm/ms 6AoN4Dv9EN7kHec8H/8Tg56q0g27LMrCoLgJkB7uIFgrCWTFIgaYP4ZebRqXu75XX7tX nEoCbeRFzeqPDtnlsfz2VUnmswHPIjuk4zxRptzxEyYE5r/avvuLCnJFwE3XezqmurVc yZInIqv5J5fn+pNZCTvRI3r3jznZwMpLgnLN1cbQ5x66UQpUfMqOBPI16H5ieybXGTl0 f3Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Vp9Yxw66Ogfudml53M3Tp8pFsKIbEDDKn6lCpMQIUN0=; b=bYHHiu4sdgvjh0f5Me9j82H+kJowTgw9BqQdRJ87ujqtoaHycYc6GdRkgkYOuqJLOm nceIxT4n9w1Lxa2Bnv5gkVuUZ394EUYACa9c0/3YARATWaN9voqxKm/NkCxDin5m2BYP 6aZ3uwJqkxVX/gfKiA1CAF57t8Y2Y0c0N1qH2X04Q8PixeN1mAToJMy23x+uG6Ste0SW wLJwC3jcyk+pie/97ql61dYPkzipI5mxP7Qt9UbX7/wOpmsSwoPEXRPG5V5yXl0yWja0 KFOS3y+jtBNffhIYsCdwQ04AXUdFB0WgLW76916exLFD4sYGu6MNE22b7xU3heRyxlaM nbOQ== X-Gm-Message-State: AMCzsaUGkeBmfOR2wcEAt3Nku0ae3t2U0wTsgWUY50eBwd/OxD2X9ple 9TsQDvLeaWXhiGhUpYN0ccXfH/UwXQ2YKm9CBcBjOYvi X-Google-Smtp-Source: ABhQp+RtZZuhA8VacSQMLYzC4T6zfRwUv2HKQZDLCdMk/WROiKdL2rEI+IXTNguU2mNMuxsf/q1AYF0mutfucNoweLE= X-Received: by 10.107.128.202 with SMTP id k71mr11359100ioi.184.1509007785824; Thu, 26 Oct 2017 01:49:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.8.66 with HTTP; Thu, 26 Oct 2017 01:49:45 -0700 (PDT) In-Reply-To: <20171026094155.39fb5f14@raksha.tavi.co.uk> References: <20171026094155.39fb5f14@raksha.tavi.co.uk> From: blubee blubeeme Date: Thu, 26 Oct 2017 16:49:45 +0800 Message-ID: Subject: Re: can't link against math.h To: Bob Eager Cc: FreeBSD Ports Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:49:46 -0000 Thanks for the tips I didn't know that it wasn't in the std c library and was GNU specific code. I think I'll take Montgomery-Smith advice and implement it as this: #define exp10f(x) (powf(10.,x)) Porting software is some interesting work. On Thu, Oct 26, 2017 at 4:41 PM, Bob Eager wrote: > 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? > _______________________________________________ > freebsd-ports@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" >