homenc / HElib

HElib is an open-source software library that implements homomorphic encryption. It supports the BGV scheme with bootstrapping and the Approximate Number CKKS scheme. HElib also includes optimizations for efficient homomorphic evaluation, focusing on effective use of ciphertext packing techniques and on the Gentry-Halevi-Smart optimizations.
https://homenc.github.io/HElib
Other
3.16k stars 761 forks source link

problem when I compile Test_EvalMap.cpp #113

Open minanoun opened 8 years ago

minanoun commented 8 years ago

Hi, thank you very much, I try to compile Test_EvalMap.cpp:

g++ Test_EvalMap.cpp /usr/local/fhe.a -I/usr/local -o Test_EvalMap.cpp -L/usr/local/lib -lntl

but I get these errors:

/usr/local/fhe.a(NumbTh.o): In function RightShift': /usr/local/include/NTL/ZZ.h:709: undefined reference to_ntlzrshift(long, long, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long_&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long*)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::operator=(NTL::ZZ const&)': /usr/local/include/NTL/ZZ.h:82: undefined reference to_ntl_zcopy1(long, long**)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::Deleter::apply(long_&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function operator<': /usr/local/include/NTL/ZZ.h:308: undefined reference to_ntlzscompare(long, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function ZZ': /usr/local/include/NTL/ZZ.h:67: undefined reference to_ntl_zcopy1(long, long)' /usr/local/fhe.a(NumbTh.o): In function rem': /usr/local/include/NTL/ZZ.h:597: undefined reference to_ntlzmod(long, long_, long)' /usr/local/fhe.a(NumbTh.o): In function operator!=': /usr/local/include/NTL/ZZ.h:307: undefined reference to_ntlzscompare(long, long)' /usr/local/fhe.a(NumbTh.o): In function operator>': /usr/local/include/NTL/ZZ.h:295: undefined reference to_ntlzcompare(long, long_)' /usr/local/fhe.a(NumbTh.o): In function sub': /usr/local/include/NTL/ZZ.h:336: undefined reference to_ntlzsub(long, long, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::operator=(NTL::ZZ const&)': /usr/local/include/NTL/ZZ.h:82: undefined reference to_ntl_zcopy1(long*, long*)' /usr/local/fhe.a(NumbTh.o): In function `NTL::ZZ::Deleter::apply(long&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to`_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function sign': /usr/local/include/NTL/ZZ.h:265: undefined reference to_ntlzsign(long)' /usr/local/include/NTL/ZZ.h:265: undefined reference to _ntl_zsign(long_)' /usr/local/fhe.a(NumbTh.o): In functionnegate': /usr/local/include/NTL/ZZ.h:346: undefined reference to_ntl_zcopy1(long*, long**)' /usr/local/include/NTL/ZZ.h:346: undefined reference to_ntlznegate(long**)' /usr/local/fhe.a(NumbTh.o): In function`NTL::ZZ::Deleter::apply(long&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long__)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::operator=(NTL::ZZ const&)': /usr/local/include/NTL/ZZ.h:82: undefined reference to_ntl_zcopy1(long_, long**)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::Deleter::apply(long&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long**)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long**)' /usr/local/fhe.a(NumbTh.o): In functionnegate': /usr/local/include/NTL/ZZ.h:346: undefined reference to_ntl_zcopy1(long, long)' /usr/local/include/NTL/ZZ.h:346: undefined reference to`_ntl_znegate(long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function operator<': /usr/local/include/NTL/ZZ.h:293: undefined reference to_ntlzcompare(long, long_)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function add': /usr/local/include/NTL/ZZ.h:331: undefined reference to_ntlzadd(long, long_, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::operator=(NTL::ZZ const&)': /usr/local/include/NTL/ZZ.h:82: undefined reference to_ntl_zcopy1(long*, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function add': /usr/local/include/NTL/ZZ.h:331: undefined reference to_ntlzadd(long, long_, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long**)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to`_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long**)' /usr/local/fhe.a(NumbTh.o):/usr/local/include/NTL/ZZ.h:39: more undefined references to_ntl_zfree(long)' follow /usr/local/fhe.a(NumbTh.o): In functionrem': /usr/local/include/NTL/ZZ.h:620: undefined reference to_ntl_zsmod(long, long)' /usr/local/fhe.a(NumbTh.o): In functionoperator<': /usr/local/include/NTL/ZZ.h:308: undefined reference to_ntl_zscompare(long, long)' /usr/local/fhe.a(NumbTh.o): In functionrem': /usr/local/include/NTL/ZZ.h:620: undefined reference to_ntl_zsmod(long*, long)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::operator=(long)': /usr/local/include/NTL/ZZ.h:84: undefined reference to_ntl_zintoz1(long, long*)' /usr/local/fhe.a(NumbTh.o): In functionrem': /usr/local/include/NTL/ZZ.h:620: undefined reference to_ntl_zsmod(long, long)' /usr/local/fhe.a(NumbTh.o): In functionoperator<': /usr/local/include/NTL/ZZ.h:308: undefined reference to_ntl_zscompare(long, long)' /usr/local/fhe.a(NumbTh.o): In functionIsZero': /usr/local/include/NTL/ZZ.h:278: undefined reference to_ntl_ziszero(long)' /usr/local/fhe.a(NumbTh.o): In functionset': /usr/local/include/NTL/ZZ.h:172: undefined reference to_ntl_zone(long)' /usr/local/include/NTL/ZZ.h:172: undefined reference to_ntl_zone(long**)' /usr/local/fhe.a(NumbTh.o): In functionoperator<=': /usr/local/include/NTL/ZZ.h:310: undefined reference to_ntl_zscompare(long_, long)' /usr/local/fhe.a(NumbTh.o): In functionmul': /usr/local/include/NTL/ZZ.h:441: undefined reference to_ntl_zsmul(long_, long, long**)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long**)' /usr/local/fhe.a(NumbTh.o): In functionadd': /usr/local/include/NTL/ZZ.h:356: undefined reference to_ntl_zsadd(long*, long, long**)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long**)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::operator=(NTL::ZZ const&)': /usr/local/include/NTL/ZZ.h:82: undefined reference to_ntl_zcopy1(long*, long**)' /usr/local/fhe.a(NumbTh.o): In function~ZZ': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long**)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::Deleter::apply(long&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long**)' /usr/local/fhe.a(NumbTh.o): In functionsub': /usr/local/include/NTL/ZZ.h:336: undefined reference to_ntl_zsub(long_, long_, long**)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::operator=(NTL::ZZ const&)': /usr/local/include/NTL/ZZ.h:82: undefined reference to`_ntl_zcopy1(long, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long**)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o):/usr/local/include/NTL/ZZ.h:39: more undefined references to _ntl_zfree(long**)' follow /usr/local/fhe.a(NumbTh.o): In functionoperator<': /usr/local/include/NTL/ZZ.h:308: undefined reference to _ntl_zscompare(long*, long)' /usr/local/fhe.a(NumbTh.o): In functionZZ': /usr/local/include/NTL/ZZ.h:67: undefined reference to _ntl_zcopy1(long*, long**)' /usr/local/fhe.a(NumbTh.o): In functionoperator%': /usr/local/include/NTL/ZZ.h:620: undefined reference to _ntl_zsmod(long*, long)' /usr/local/fhe.a(NumbTh.o): In functionconv': /usr/local/include/NTL/ZZ.h:198: undefined reference to `_ntl_zintoz1(long, long)' /usr/local/fhe.a(NumbTh.o): In functionZZ': /usr/local/include/NTL/ZZ.h:67: undefined reference to_ntl_zcopy1(long*, long)' /usr/local/fhe.a(NumbTh.o): In functiondiv': /usr/local/include/NTL/ZZ.h:626: undefined reference to_ntl_zsdiv(long*, long, long)' /usr/local/fhe.a(NumbTh.o): In functionrem': /usr/local/include/NTL/ZZ.h:620: undefined reference to_ntlzsmod(long*, long)' /usr/local/fhe.a(NumbTh.o): In function`NTL::ZZ::Deleter::apply(long&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long__)' /usr/local/fhe.a(NumbTh.o): In functionoperator==': /usr/local/include/NTL/ZZ.h:306: undefined reference to_ntl_zscompare(long_, long)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to`_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function ZZ': /usr/local/include/NTL/ZZ.h:67: undefined reference to_ntl_zcopy1(long*, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long**)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function ZZ': /usr/local/include/NTL/ZZ.h:67: undefined reference to_ntlzcopy1(long, long)' /usr/local/fhe.a(NumbTh.o): In function conv': /usr/local/include/NTL/ZZ.h:201: undefined reference to_ntl_zintoz1(long, long)' /usr/local/fhe.a(NumbTh.o): In function ZZ': /usr/local/include/NTL/ZZ.h:67: undefined reference to_ntlzcopy1(long, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function mul': /usr/local/include/NTL/ZZ.h:426: undefined reference to_ntlzmul(long, long_, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function mul': /usr/local/include/NTL/ZZ.h:426: undefined reference to_ntlzmul(long, long_, long)' /usr/local/fhe.a(NumbTh.o): In function div': /usr/local/include/NTL/ZZ.h:592: undefined reference to_ntlzdiv(long, long_, long, long)' /usr/local/fhe.a(NumbTh.o): In function rem': /usr/local/include/NTL/ZZ.h:597: undefined reference to_ntlzmod(long, long_, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function operator==': /usr/local/include/NTL/ZZ.h:306: undefined reference to_ntlzscompare(long, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long_&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long**)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long**)' /usr/local/fhe.a(NumbTh.o):/usr/local/include/NTL/ZZ.h:39: more undefined references to_ntl_zfree(long)' follow /usr/local/fhe.a(NumbTh.o): In function ppInvert(NTL::Mat<NTL::zz_p>&, NTL::Mat<NTL::zz_p> const&, long, long)': /home/emna-eya/Musique/HElib-master/src/NumbTh.cpp:1179: undefined reference toNTL::inv(NTL::MatNTL::zz_p&, NTL::MatNTL::zz_p const&)' /home/emna-eya/Musique/HElib-master/src/NumbTh.cpp:1164: undefined reference to NTL::inv(NTL::Mat<NTL::zz_p>&, NTL::Mat<NTL::zz_p> const&)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::Deleter::apply(long&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long**)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long**)' /usr/local/fhe.a(NumbTh.o): In functionrem': /usr/local/include/NTL/ZZ.h:620: undefined reference to_ntl_zsmod(long, long)' /usr/local/fhe.a(NumbTh.o): In functionconv': /usr/local/include/NTL/ZZ.h:222: undefined reference to_ntl_ztoint(long)' /usr/local/fhe.a(NumbTh.o): In functionrem': /usr/local/include/NTL/ZZ.h:620: undefined reference to_ntl_zsmod(long, long)' /usr/local/fhe.a(NumbTh.o): In functionmul': /usr/local/include/NTL/ZZ.h:441: undefined reference to_ntl_zsmul(long*, long, long)' /usr/local/fhe.a(NumbTh.o): In functionadd': /usr/local/include/NTL/ZZ.h:331: undefined reference to_ntl_zadd(long, long, long)' /usr/local/fhe.a(NumbTh.o): In functionrem': /usr/local/include/NTL/ZZ.h:620: undefined reference to_ntl_zsmod(long, long)' /usr/local/fhe.a(NumbTh.o): In functionmul': /usr/local/include/NTL/ZZ.h:441: undefined reference to_ntl_zsmul(long, long, long)' /usr/local/fhe.a(NumbTh.o): In functionadd': /usr/local/include/NTL/ZZ.h:331: undefined reference to_ntl_zadd(long, long, long)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::Deleter::apply(long_&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function rem': /usr/local/include/NTL/ZZ.h:620: undefined reference to_ntlzsmod(long, long)' /usr/local/include/NTL/ZZ.h:620: undefined reference to _ntl_zsmod(long*, long)' /usr/local/fhe.a(NumbTh.o): In functionmul': /usr/local/include/NTL/ZZ.h:441: undefined reference to _ntl_zsmul(long*, long, long**)' /usr/local/fhe.a(NumbTh.o): In functionadd': /usr/local/include/NTL/ZZ.h:331: undefined reference to _ntl_zadd(long*, long*, long**)' /usr/local/fhe.a(NumbTh.o): In functionrem': /usr/local/include/NTL/ZZ.h:620: undefined reference to _ntl_zsmod(long*, long)' /usr/local/fhe.a(NumbTh.o): In functionmul': /usr/local/include/NTL/ZZ.h:441: undefined reference to _ntl_zsmul(long*, long, long**)' /usr/local/fhe.a(NumbTh.o): In functionadd': /usr/local/include/NTL/ZZ.h:331: undefined reference to _ntl_zadd(long*, long*, long**)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::Deleter::apply(long_&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long__)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function rem': /usr/local/include/NTL/ZZ.h:620: undefined reference to_ntlzsmod(long, long)' /usr/local/include/NTL/ZZ.h:620: undefined reference to _ntl_zsmod(long*, long)' /usr/local/fhe.a(NumbTh.o): In functionmul': /usr/local/include/NTL/ZZ.h:441: undefined reference to _ntl_zsmul(long*, long, long**)' /usr/local/fhe.a(NumbTh.o): In functionadd': /usr/local/include/NTL/ZZ.h:331: undefined reference to _ntl_zadd(long*, long*, long**)' /usr/local/fhe.a(NumbTh.o): In functionrem': /usr/local/include/NTL/ZZ.h:620: undefined reference to _ntl_zsmod(long*, long)' /usr/local/fhe.a(NumbTh.o): In functionmul': /usr/local/include/NTL/ZZ.h:441: undefined reference to _ntl_zsmul(long*, long, long**)' /usr/local/fhe.a(NumbTh.o): In functionadd': /usr/local/include/NTL/ZZ.h:331: undefined reference to _ntl_zadd(long*, long*, long**)' /usr/local/fhe.a(NumbTh.o): In functionNTL::ZZ::Deleter::apply(long_&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long__)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function rem': /usr/local/include/NTL/ZZ.h:620: undefined reference to_ntlzsmod(long, long)' /usr/local/fhe.a(NumbTh.o): In function div': /usr/local/include/NTL/ZZ.h:626: undefined reference to_ntlzsdiv(long, long, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long_&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to`_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function div': /usr/local/include/NTL/ZZ.h:626: undefined reference to_ntl_zsdiv(long*, long, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o): In function MulMod': /usr/local/include/NTL/ZZ.h:1264: undefined reference to_ntlzmulmod(long, long, long, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long_&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to`_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long**)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to`_ntl_zfree(long)' /usr/local/fhe.a(NumbTh.o):/usr/local/include/NTL/ZZ.h:39: more undefined references to _ntl_zfree(long**)' follow /usr/local/fhe.a(NumbTh.o): In functionZZ': /usr/local/include/NTL/ZZ.h:67: undefined reference to`_ntlzcopy1(long, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long_&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to`_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long**)' /usr/local/fhe.a(NumbTh.o): In functionZZ': /usr/local/include/NTL/ZZ.h:67: undefined reference to_ntl_zcopy1(long_, long__)' /usr/local/include/NTL/ZZ.h:67: undefined reference to_ntlzcopy1(long, long)' /usr/local/fhe.a(NumbTh.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long**)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/fhe.a(PAlgebra.o): In functionZZ': /usr/local/include/NTL/ZZ.h:72: undefined reference to_ntl_zintoz1(long, long*)' /usr/local/fhe.a(PAlgebra.o): In functionmul': /usr/local/include/NTL/ZZ.h:441: undefined reference to_ntl_zsmul(long, long, long)' /usr/local/fhe.a(PAlgebra.o): In function~ZZ': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(PAlgebra.o): In functionNTL::ZZ::operator=(NTL::ZZ const&)': /usr/local/include/NTL/ZZ.h:82: undefined reference to_ntlzcopy1(long*, long**)' /usr/local/fhe.a(PAlgebra.o): In function`NTL::ZZ::Deleter::apply(long&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long__)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long__)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(PAlgebra.o):/usr/local/include/NTL/ZZ.h:39: more undefined references to `_ntl_zfree(long)' follow /usr/local/fhe.a(PAlgebra.o): In function power': /usr/local/include/NTL/ZZ.h:1168: undefined reference to_ntl_zexps(long, long, long_)' /usr/local/fhe.a(PAlgebra.o): In function `NTL::ZZ::Deleter::apply(long&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long**)' /usr/local/fhe.a(PAlgebra.o): In functionNTL::ZZ::SinglePrecision() const': /usr/local/include/NTL/ZZ.h:117: undefined reference to _ntl_zsptest(long*)' /usr/local/fhe.a(PAlgebra.o): In functionto_long': /usr/local/include/NTL/ZZ.h:223: undefined reference to _ntl_ztoint(long*)' /usr/local/fhe.a(PAlgebra.o): In functionNTL::ZZ::Deleter::apply(long_&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long__)' /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/fhe.a(PAlgebra.o): In function power': /usr/local/include/NTL/ZZ.h:1168: undefined reference to_ntl_zexps(long, long, long)' /usr/local/fhe.a(PAlgebra.o): In function ~ZZ': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/fhe.a(PAlgebra.o): In function NTL::ZZ::SinglePrecision() const': /usr/local/include/NTL/ZZ.h:117: undefined reference to_ntlzsptest(long)' /usr/local/fhe.a(PAlgebra.o): In function to_long': /usr/local/include/NTL/ZZ.h:223: undefined reference to_ntlztoint(long)' /usr/local/fhe.a(PAlgebra.o): In function NTL::ZZ::Deleter::apply(long_&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to`_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long**)' /usr/local/fhe.a(FHEContext.o): In functionNTL::ZZ::operator=(long)': /usr/local/include/NTL/ZZ.h:84: undefined reference to_ntl_zintoz1(long, long**)' /usr/local/fhe.a(FHEContext.o): In functionmul': /usr/local/include/NTL/ZZ.h:441: undefined reference to`_ntl_zsmul(long*, long, long)' /usr/local/fhe.a(FHEContext.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/fhe.a(CModulus.o): In function NTL::ZZ::Deleter::apply(long*&)': /usr/local/include/NTL/ZZ.h:39: undefined reference to_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to `_ntl_zfree(long)' /usr/local/include/NTL/ZZ.h:39: undefined reference to _ntl_zfree(long**)' /usr/local/fhe.a(CModulus.o):/usr/local/include/NTL/ZZ.h:39: more undefined references to_ntl_zfree(long)' follow /usr/local/lib/libntl.a(lip.o): In function redc': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:3509: undefined reference togmpn_addmul_1' /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:3521: undefined reference to `gmpn_sub_n' /usr/local/lib/libntl.a(lip.o): In function_ntl_rem_struct_basic::eval(long_, void_, _ntl_tmp_vec*)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:5729: undefined reference togmpn_mod_1' /usr/local/lib/libntl.a(lip.o): In function_ntl_reduce_struct_montgomery::eval(void**, void**)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:3594: undefined reference togmpn_addmul_1' /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:3606: undefined reference to__gmpn_sub_n' /usr/local/lib/libntl.a(lip.o): In function_ntl_crt_structbasic::eval(void**, long const, _ntl_tmpvec)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:4703: undefined reference to __gmpn_addmul_1' /usr/local/lib/libntl.a(lip.o): In functiongmod_simple': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:2067: undefined reference to __gmpn_tdiv_qr' /usr/local/lib/libntl.a(lip.o): In function_ntl_rem_structfast::eval(long, void_, _ntl_tmpvec)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:5769: undefined reference to __gmpn_mod_1' /usr/local/lib/libntl.a(lip.o): In function_ntl_rem_structmedium::eval(long, void_, _ntl_tmpvec)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:5813: undefined reference to __gmpn_mod_1' /usr/local/lib/libntl.a(lip.o): In function_ntlgrshift(void, long, void)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:1420: undefined reference to `gmpn_rshift' /usr/local/lib/libntl.a(lip.o): In function_ntl_glshift(void_, long, void**)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:1355: undefined reference togmpn_lshift' /usr/local/lib/libntl.a(lip.o): In function__gmpn_sub': /usr/local/include/gmp.h:2194: undefined reference togmpn_sub_n' /usr/local/lib/libntl.a(lip.o): In function__gmpn_add': /usr/local/include/gmp.h:2139: undefined reference togmpn_add_n' /usr/local/lib/libntl.a(lip.o): In function`gmpn_sub': /usr/local/include/gmp.h:2194: undefined reference to __gmpn_sub_n' /usr/local/include/gmp.h:2194: undefined reference togmpn_sub_n' /usr/local/lib/libntl.a(lip.o): In function `gmpn_add': /usr/local/include/gmp.h:2139: undefined reference to__gmpn_add_n' /usr/local/lib/libntl.a(lip.o): In functiongmpn_sub': /usr/local/include/gmp.h:2194: undefined reference to__gmpn_sub_n' /usr/local/include/gmp.h:2194: undefined reference togmpn_sub_n' /usr/local/include/gmp.h:2194: undefined reference to`gmpn_sub_n' /usr/local/include/gmp.h:2194: undefined reference to __gmpn_sub_n' /usr/local/lib/libntl.a(lip.o): In function_ntlgmul(void, void_, void**)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:1725: undefined reference to __gmpn_mul' /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:1727: undefined reference togmpn_mul' /usr/local/lib/libntl.a(lip.o): In function `_ntl_gsmul(void*, long, void)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:1792: undefined reference to__gmpn_mul_1' /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:1790: undefined reference togmpn_lshift' /usr/local/lib/libntl.a(lip.o): In function`_ntlgsdiv(void, long, void)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:1850: undefined reference to __gmpn_divrem_1' /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:1848: undefined reference togmpn_rshift' /usr/local/lib/libntl.a(lip.o): In function _ntl_gsmod(void_, long)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:1915: undefined reference togmpn_mod_1' /usr/local/lib/libntl.a(lip.o): In function_ntl_gdiv(void_, void_, void**, void**)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:1989: undefined reference togmpn_tdiv_qr' /usr/local/lib/libntl.a(lip.o): In functiongadd_mul_many': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:4662: undefined reference togmpn_addmul_1' /usr/local/lib/libntl.a(lip.o): In function_ntl_gsqrt(void_, void__)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:2105: undefined reference togmpn_sqrtrem' /usr/local/lib/libntl.a(lip.o): In function_ntl_gsqrts(long)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:2131: undefined reference to__gmpn_sqrtrem' /usr/local/lib/libntl.a(lip.o): In function`_ntlggcd(void, void_, void)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:2187: undefined reference to __gmpn_gcd' /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:2185: undefined reference togmpn_gcd' /usr/local/lib/libntl.a(lip.o): In function _ntl_gexteucl(void_, void**, void*, void**, void**)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:2536: undefined reference togmpn_gcdext' /usr/local/lib/libntl.a(lip.o): In function_ntl_ginv(void_, void_, void**)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:2652: undefined reference to__gmpn_gcdext' /usr/local/lib/libntl.a(lip.o): In function_ntl_gaorsmul_1(void_, long, long, void__)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:5983: undefined reference togmpn_addmul_1' /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:5992: undefined reference to`gmpn_mul_1' /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:6009: undefined reference to __gmpn_submul_1' /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:6044: undefined reference togmpn_mul_1' /usr/local/lib/libntl.a(lip.o): In function _ntl_general_rem_one_struct_apply(void_, long, _ntl_general_rem_one_struct*)': /home/emna-eya/ntl-9.10.0/src/g_lip_impl.h:6209: undefined reference togmpn_mod_1' collect2: error: ld returned 1 exit status

Alexnder commented 7 years ago

Try to add -lgmp just after -lntl

updated: btw. I also had Segmentation fault error when I run my program and it was fixed by adding -std=c++11 -lstdc++ to g++ flags