I am using the C++ AMP tinymt library from Codeplex to generate random numbers. The library works fine, except that when I #include <amp_tinymt_rng.h>
in two different files in the same project, linking errors arise mentioning redefintion of certain variables tinymt_lib::tinymt_dc_data and tinymt_dc_data_32.
What would be a good fix to get rid of this issue, given that I am using #pragma once
in every header already?
I am using Visual Studio 2013 Professional.
As a side suggestion, what would be a simpler way to generate random numbers without the overhead of a special library? I am not concerned about the sequence not being safely random, a simple random()
or rand()
be suffice.