How to create a DiscreteUniformGeneratorImpl<DCRTPoly> with a system installed openFHE

Hi everyone.
Here is the issue I am facing.
I need to generate some numbers following a uniform distribution inside my project.
I use a system installation of openFHE.
I can instantiate the following dug :

lbcrypto::DiscreteUniformGeneratorImpl dug;

without any compilation error, but when I try to use its methods, like SetModulus, I get an “undefined reference to …”, probably because of the system installation.
Do some of you know a proper way to instantiate such a generator in my project?
Thank you in advance for your help!

Try instantiating it the same as at openfhe-development/src/binfhe/lib/lwe-pke.cpp at v1.4.0 · openfheorg/openfhe-development · GitHub, i.e., using a constructor with the modulus.

1 Like

Thank you, it worked perfectly.