'log2' is not a member of 'std'
Jean-Francois Gobin
jeanfgobin at gmail.com
Sun Jul 2 10:35:25 UTC 2017
Jan,
Could you test with the file renamed as « prog.cc <http://prog.cc/> »? I remember that gcc is picky about the extension.
Jean
> Le 2 juil. 2017 à 12:28, Jan Stary <hans at stare.cz> a écrit :
>
> This is MacOSX 10.6.8 running various compilers provided by MacPorts.
> Compiling the following C++ source
>
> #include <cmath>
>
> int main(void)
> {
> double d = std::log2(2.3456789f);
> return 0;
> }
>
> results in
>
> 'log2' is not a member of 'std'.
>
> This happens with the system g++, which is i686-apple-darwin10-g++-4.2.1,
> each of g++-4.0 g++-4.2 g++-mp-5 g++-mp-6, and with clang++-mp-3.4;
> in each case, I am compiling as $CXX -std=c++11 prog.c
>
> Apparently, there is some relatively recent turmoil about the C++ libs;
> I don't know much c++ but find myself compiling some third party C++ code.
> Am I missing something obvious?
>
> Jan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20170702/d8b4de62/attachment.html>
More information about the macports-users
mailing list