Date: Thu, 26 Oct 2017 10:53:01 +0800 From: Christopher Hall <christopherhall.hsw@gmail.com> To: blubee blubeeme <gurenchan@gmail.com> Cc: FreeBSD Ports <freebsd-ports@freebsd.org> Subject: Re: can't link against math.h Message-ID: <20171026105301.071a4302@arria.bitmark.lan> In-Reply-To: <CALM2mE=VO3VkS3EdP4GhZRudyxcgJNQwH3vFqBUmdY3Ze3kBwQ@mail.gmail.com> References: <CALM2mE=VO3VkS3EdP4GhZRudyxcgJNQwH3vFqBUmdY3Ze3kBwQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello blubee, On Thu, 26 Oct 2017 10:05:00 +0800, blubee blubeeme <gurenchan@gmail.com> wrote: > I wrote a simple test program to test and see if math.h has the > function: exp10f grep -r exp10f /usr/include shows that is does not. I could not find this function in man pages either and also http://en.cppreference.com/w/c/numeric/math/exp does not list it. log10 exists but did not see and kind of exp10. Could you have been thin of a macro you saw in an app? the only ref I found from searching ports/math was: /usr/ports/math/ldouble/files/i386-makefile-patch: exp10l.o exp2l.o expl.o expx2l.o fdtrl.o gammal.o gdtrl.o igamil.o igaml.o \ > > #include <math.h> > > 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? > _______________________________________________ > 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" -- Best Regards. Christopher Hall.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171026105301.071a4302>