I use the IDE CLION to program in C ++, and it took very little time. I'm doing a mini-game on the console where I need to generate random numbers.
Use rand () with the standard library and time (), but the environment recommends me to use a different generator, following the "conventions" of C ++ 11, and I have decided to use the random library in this way:
#include < random >
std::random_device rd;
std::mt19937 mt(rd());
std::uniform_int_distribution<int> dist(4, 77);
roca.mover(dist(mt));
When I run the game in the environment console, it works more or less well.
The problem comes when I want to run my game.exe on the outside, because first it tells me that I need "libgcc_s_seh-1.dll". I install it and it asks for "libwinpthread-1.dll". And when both are installed in the directory of the executable (I do not know if this is done) it tells me that the application can not be started because this error has occurred - > 0xc000007b.
I can use rand()
in the traditional way, but since I am learning the language I would like to know why this error occurs, how to solve it ...
I use Windows 10 64 bits and my compiler is MinGW