Я пишу демонстрацию гомоморфного шифрования с Microsoft Seal в C ++. < /p>
Я построил и установил вручную Microsoft Seal. Я вижу, что включают файлы в /ср/local/include/seal-4.1 и a lib file/usr/local/lib/libseal-4.1.a.образно -Лиал -4.1 main.cpp , и возвращает Bounch из «неопределенной ссылки на ошибку:
/usr/bin/ld: /tmp/ccZGo8L8.o: warning: relocation against `_ZN4seal4util16global_variables18global_memory_poolE' in read-only section `.text._ZN4seal16MemoryPoolHandle6GlobalEv[_ZN4seal16MemoryPoolHandle6GlobalEv]'
/usr/bin/ld: /tmp/ccZGo8L8.o: in function `generate_keypair[abi:cxx11]()':
main.cpp:(.text+0x11d): undefined reference to `seal::CoeffModulus::BFVDefault(unsigned long, seal::sec_level_type)'
/usr/bin/ld: main.cpp:(.text+0x395): undefined reference to `seal::KeyGenerator::KeyGenerator(seal::SEALContext const&)'
/usr/bin/ld: main.cpp:(.text+0x3a4): undefined reference to `seal::KeyGenerator::secret_key() const'
/usr/bin/ld: /tmp/ccZGo8L8.o: in function `encrypt(std::unique_ptr&, std::unique_ptr&)':
main.cpp:(.text+0xc4f): undefined reference to `seal::Encryptor::Encryptor(seal::SEALContext const&, seal::PublicKey const&)'
/usr/bin/ld: /tmp/ccZGo8L8.o: in function `evaluate(std::unique_ptr&, std::unique_ptr&, std::unique_ptr&)':
main.cpp:(.text+0x1898): undefined reference to `seal::Evaluator::Evaluator(seal::SEALContext const&)'
/usr/bin/ld: /tmp/ccZGo8L8.o: in function `decrypt(std::unique_ptr&, std::unique_ptr&, std::unique_ptr&)':
main.cpp:(.text+0x200e): undefined reference to `seal::Decryptor::Decryptor(seal::SEALContext const&, seal::SecretKey const&)'
/usr/bin/ld: main.cpp:(.text+0x2065): undefined reference to `seal::Decryptor::decrypt(seal::Ciphertext const&, seal::Plaintext&)'
/usr/bin/ld: /tmp/ccZGo8L8.o: in function `generate_keypair2[abi:cxx11]()':
main.cpp:(.text+0x25e1): undefined reference to `seal::CoeffModulus::BFVDefault(unsigned long, seal::sec_level_type)'
/usr/bin/ld: main.cpp:(.text+0x2706): undefined reference to `seal::BatchEncoder::BatchEncoder(seal::SEALContext const&)'
/usr/bin/ld: main.cpp:(.text+0x2948): undefined reference to `seal::KeyGenerator::KeyGenerator(seal::SEALContext const&)'
/usr/bin/ld: main.cpp:(.text+0x2957): undefined reference to `seal::KeyGenerator::secret_key() const'
...
< /code>
Я не знаю, в чем проблема. Я очень новичок в C ++ и SEAL. Является ли/usr/local/lib/libseal-4.1.a
неправильный файл LIB? Или моя сборка cmd неправильно?
Я пишу демонстрацию гомоморфного шифрования с Microsoft Seal в C ++. < /p> Я построил и установил вручную Microsoft Seal. Я вижу, что включают файлы в /ср/local/include/seal-4.1 и a lib file/usr/local/lib/libseal-4.1.a.образно -Лиал -4.1 main.cpp , и возвращает Bounch из «неопределенной ссылки на ошибку: [code]/usr/bin/ld: /tmp/ccZGo8L8.o: warning: relocation against `_ZN4seal4util16global_variables18global_memory_poolE' in read-only section `.text._ZN4seal16MemoryPoolHandle6GlobalEv[_ZN4seal16MemoryPoolHandle6GlobalEv]' /usr/bin/ld: /tmp/ccZGo8L8.o: in function `generate_keypair[abi:cxx11]()': main.cpp:(.text+0x11d): undefined reference to `seal::CoeffModulus::BFVDefault(unsigned long, seal::sec_level_type)' /usr/bin/ld: main.cpp:(.text+0x395): undefined reference to `seal::KeyGenerator::KeyGenerator(seal::SEALContext const&)' /usr/bin/ld: main.cpp:(.text+0x3a4): undefined reference to `seal::KeyGenerator::secret_key() const' /usr/bin/ld: /tmp/ccZGo8L8.o: in function `encrypt(std::unique_ptr&, std::unique_ptr&)': main.cpp:(.text+0xc4f): undefined reference to `seal::Encryptor::Encryptor(seal::SEALContext const&, seal::PublicKey const&)' /usr/bin/ld: /tmp/ccZGo8L8.o: in function `evaluate(std::unique_ptr&, std::unique_ptr&, std::unique_ptr&)': main.cpp:(.text+0x1898): undefined reference to `seal::Evaluator::Evaluator(seal::SEALContext const&)' /usr/bin/ld: /tmp/ccZGo8L8.o: in function `decrypt(std::unique_ptr&, std::unique_ptr&, std::unique_ptr&)': main.cpp:(.text+0x200e): undefined reference to `seal::Decryptor::Decryptor(seal::SEALContext const&, seal::SecretKey const&)' /usr/bin/ld: main.cpp:(.text+0x2065): undefined reference to `seal::Decryptor::decrypt(seal::Ciphertext const&, seal::Plaintext&)' /usr/bin/ld: /tmp/ccZGo8L8.o: in function `generate_keypair2[abi:cxx11]()': main.cpp:(.text+0x25e1): undefined reference to `seal::CoeffModulus::BFVDefault(unsigned long, seal::sec_level_type)' /usr/bin/ld: main.cpp:(.text+0x2706): undefined reference to `seal::BatchEncoder::BatchEncoder(seal::SEALContext const&)' /usr/bin/ld: main.cpp:(.text+0x2948): undefined reference to `seal::KeyGenerator::KeyGenerator(seal::SEALContext const&)' /usr/bin/ld: main.cpp:(.text+0x2957): undefined reference to `seal::KeyGenerator::secret_key() const' ... < /code> Я не знаю, в чем проблема. Я очень новичок в C ++ и SEAL. Является ли/usr/local/lib/libseal-4.1.a [/code] неправильный файл LIB? Или моя сборка cmd неправильно?