-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime error #1
Comments
On running the make command getting the following errors In function 'SrcIter uneven_copy(SrcIter, DestIter, DestIter, std::true_type)': |
By passing the argument |
Hi,
I am trying to use numpy_random library for my project. But facing some issues.
First I build the code using the command cmake CmakeFiles.txt and then copied the src/numpy_random.h to the directory that contains the code in the sample in a file trial.cpp.
I ran the trial.cpp using the command g++ -L "/data/users/numpy_random" -std=c++11 trial.cpp
But I am getting errors like this:
'''
trial.cpp: In function 'int main()':
trial.cpp:12:23: error: 'class RandomState<std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> >' has no member named 'rand_int'
std::cout << random.rand_int(0, 9) << std::endl;
^~~~~~~~
trial.cpp:13:23: error: 'class RandomState<std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> >' has no member named 'rand_int'
std::cout << random.rand_int(0, 9) << std::endl;
^~~~~~~~
trial.cpp:14:23: error: 'class RandomState<std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> >' has no member named 'rand_int'
std::cout << random.rand_int(0, 9) << std::endl;
^~~~~~~~
trial.cpp:15:23: error: 'class RandomState<std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> >' has no member named 'rand_int'
std::cout << random.rand_int(0, 9) << std::endl;
^~~~~~~~
In file included from trial.cpp:3:0:
numpy_random.h: In instantiation of 'RandomState::RandomState(Ts&& ...) [with Ts = {RandomState<std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> >}; RngEngine = std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>]':
trial.cpp:9:41: required from here
numpy_random.h:261:66: error: cannot bind non-const lvalue reference of type 'RandomState<std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> >&' to an rvalue of type 'RandomState<std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> >'
RandomState(Ts&&... args) : _engine{std::forward(args)...} {
'''
The text was updated successfully, but these errors were encountered: