1

I am having an import issue with <random/uniform.h>.

The issue is because random was introduced in c++11 (Why is the c++ standard library not working?). I can specify support for c++11 with -std=c++11 or -std=c++x0, but it won't work with g++. I tried using clang, but I am not sure if I have the required min clang version (4.2).

    clang++ --version

gives

    Apple LLVM version 7.0.2 (clang-700.1.81)
    Target: x86_64-apple-darwin14.5.0
    Thread model: posix

When I check Xcode for updates, there are none.

Community
  • 1
  • 1
Sean
  • 445
  • 1
  • 5
  • 10
  • Isn't `gcc` just a symlink to `clang`? – trojanfoe Feb 27 '16 at 21:29
  • 2
    Are you sure there is a header in c++11 std named ? – RealityPC Feb 27 '16 at 21:32
  • 1
    Yeah looks to me like it should be `#include `. – trojanfoe Feb 27 '16 at 21:33
  • 1
    What @trojanfoe said, minus the semicolon at the end. – Kurt Stutsman Feb 27 '16 at 21:34
  • 1
    Hahah. What semi-colon :D – trojanfoe Feb 27 '16 at 21:34
  • @trojanfoe I'm trying to avoid changing their code that *supposedly* works. If I just include random, then I get "error: use of undeclared identifier 'uniformRandGen'". Maybe they aren't even referencing random, but a different library that I don't have? – Sean Feb 27 '16 at 21:56
  • 2
    @Sean - the C++ standard provides the header ``. It does not provide a header ``. It also does not define an identifier `uniformRangGen`. So whatever it is that you're talking about, it's not standard C++, but there's no hint in your question of what you're trying to do or where these names are coming from. – Pete Becker Feb 27 '16 at 21:59

0 Answers0