Menu

#6 Version 0.92 - please update doc/installation.txt for Linux

v1.0_(example)
closed-fixed
nobody
None
5
2014-11-20
2014-11-18
Jirka
No

Hi,

please update doc/installation.txt for Linux. When compiled with g++ 4.8.2 you will get following warning:

===============================================================

In file included from /usr/include/c++/4.8.2/chrono:35:0,
from tools/RNG_test.cpp:53:
/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library suppo
rt for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c
++11 or -std=gnu++11 compiler options.
===============================================================

I advocate to update doc/installation.txt to have -std=c++11 for RNG_test compilation:

g++ -std=c++11 -o RNG_test tools/RNG_test.cpp libPractRand.a -O3 -Iinclude -pthread

Thanks
Jirka

Discussion

  • - 2014-11-18

    Documentation updated for PractRand 0.93. The relevant section changed to:

    On linux I build the PractRand library using these command lines:
    g++ -c src/.cpp src/RNGs/.cpp src/RNGs/other/.cpp -O3 -Iinclude -pthread
    ar rcs libPractRand.a
    .o
    (then I delete the leftover .o files, but that's not necessary)

    And then I build the PractRand command line tools like this:
    g++ -o RNG_test tools/RNG_test.cpp libPractRand.a -O3 -Iinclude -pthread -std=c++11
    g++ -o RNG_benchmark tools/RNG_benchmark.cpp libPractRand.a -O3 -Iinclude -pthread -std=c++11
    g++ -o RNG_output tools/RNG_output.cpp libPractRand.a -O3 -Iinclude -pthread -std=c++11

    Note that the -pthread and -std=c++11 are optional, and are currently only
    used for RNG_test. Both requirements can be disabled from near the top of
    tools/RNG_test.cpp by commenting out a preprocessor define for each
    (MULTITHREADING_SUPPORTED and USE_CPP_2011 respectively). Disabling
    multithreading will make the multithreading-related command line options
    no longer work for RNG_test, while disabling C++2011 will make RNG_test
    report time in less consistent ways.

     
  • Jirka

    Jirka - 2014-11-18

    Great! Thank you!

    Jirka

     
  • - 2014-11-20
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB