When I run the following code using g++ compiler it runs just fine. Then when I try running it using waf in ns3 it gives me the following error
challenge.cc:(.text.startup+0xc): undefined reference to
`boost::random::random_device::random_device()'
This is the code,
#include <iostream>
#include <boost/random.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/random/random_device.hpp>
int main()
{
using namespace boost::multiprecision;
using namespace boost::random;
boost::random::random_device seeder;
boost::random::mt19937 rng(seeder());
typedef independent_bits_engine<mt19937, 512, uint512_t> generator512_type;
generator512_type gen512(rng);
uint512_t challenge;
challenge = gen512();
std::cout << "The challenge is: " << challenge << std::endl;
return 0;
}
any Idea how to fix it?
Aucun commentaire:
Enregistrer un commentaire