Premium Intel 758 Posted December 10, 2019 Premium Share Posted December 10, 2019 I am using a VM (to not destroy the test server) with FreeBSD 11.3 i386 I installed all the packages needed: devil makedepend gmake mysql python27 cryptopp boost-all pkg install lang/gcc7 LINK Makefile LINK Cipher.cpp LINK Cipher.h This is the hidden content, please Sign In or Sign Up And.. /usr/local/bin/ld: ../../build/obj/game/cipher.o: in function `DH2KeyAgreement::Prepare(void*, unsigned int*)': /sources/intel/game/src/cipher.cpp:315: undefined reference to `CryptoPP::Integer::Integer(char const*, CryptoPP::ByteOrder)' /usr/local/bin/ld: /sources/intel/game/src/cipher.cpp:322: undefined reference to `CryptoPP::Integer::Integer(char const*, CryptoPP::ByteOrder)' /usr/local/bin/ld: /sources/intel/game/src/cipher.cpp:324: undefined reference to `CryptoPP::Integer::Integer(char const*, CryptoPP::ByteOrder)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0xd4): undefined reference to `CryptoPP::StreamTransformation::ProcessLastBlock(unsigned char*, unsigned int, unsigned char const*, unsigned int)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x118): undefined reference to `non-virtual thunk to CryptoPP::CTR_ModePolicy::OperateKeystream(CryptoPP::KeystreamOperation, unsigned char*, unsigned char const*, unsigned int)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x120): undefined reference to `non-virtual thunk to CryptoPP::CTR_ModePolicy::CipherResynchronize(unsigned char*, unsigned char const*, unsigned int)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x128): undefined reference to `non-virtual thunk to CryptoPP::CTR_ModePolicy::SeekToIteration(unsigned long long)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x158): undefined reference to `non-virtual thunk to CryptoPP::AdditiveCipherTemplate<CryptoPP::AbstractPolicyHolder<CryptoPP::AdditiveCipherAbstractPolicy, CryptoPP::CTR_ModePolicy> >::GenerateBlock(unsigned char*, unsigned int)' [...] collect2: error: ld returned 1 exit status I tried using the older version of cryptopp (5.6.6 if I am not mistaken, or 5.6.2) using FreeBSD include files and the Extern include files, with and without the lib I already have from the other machine where it compiles (with gcc49 though). It compiles without errors, but can't seem to link to the cryptolib at all. Nothing seems to work. 9 2 1 1 3 2 Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2426 Posted December 10, 2019 Developer Share Posted December 10, 2019 If i remember fine, crytopp 6+ doesnt work with metin2 without adjustments in metin2 source codes because it use old methods disablen in newer versions My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
Premium Intel 758 Posted December 10, 2019 Author Premium Share Posted December 10, 2019 3 hours ago, Ikarus_ said: If i remember fine, crytopp 6+ doesnt work with metin2 without adjustments in metin2 source codes because it use old methods disablen in newer versions It may be, but even including the extern cryptopp folder (5.6.5) or the FreeBSD one (without having the new one installed) it still gives me linking problems. And I know it's the older one 'cause: In file included from desc.h:8:0, from desc_client.h:4, from cmd_general.cpp:11: cipher.h:7:17: error: 'CryptoPP::byte' has not been declared using CryptoPP::byte; ^~~~ but also started giving me errors on: encoder_->ProcessData((byte*)buffer, (const byte*)buffer, length); and similia, which can be fixed using CryptoPP::byte and adding: namespace CryptoPP { using byte = unsigned char; } to cipher.h But nothing anyway. Maybe conflict with the FreeBSD Version? I set back: INCDIR += -I/usr/local/include/gtest/ -I/usr/local/include/cryptopp/ LIBDIR += -L/usr/local/lib/gtest/ -L/usr/local/lib/cryptopp/ > pkg remove cryptopp > pkg install cryptopp-5.6.5.txz cryptopp 5.6.5 took from FreeBSD archive I rebuild the dependences and I try to recompile game. Still, undefined references, but way less at least. Maybe I am close! (Kappa) Allright, let's bruteforce it. Fetching include/local/lib/libcryptopp.so.5.6.5 e usr/local/include/cryptopp from the 9.3 server where it definitely works and let's compile again. Nope, totally the same. Maybe using the lib in the extern folder? -I../../../extern/include/cryptopp/ -L../../../extern/lib/cryptopp/ -l:libcryptopp.a -lgtest /usr/local/bin/ld: ../../build/obj/game/cipher.o: in function `DH2KeyAgreement::Prepare(void*, unsigned int*)': /sources/intel/game/src/cipher.cpp:315: undefined reference to `CryptoPP::Integer::Integer(char const*, CryptoPP::ByteOrder)' /usr/local/bin/ld: /sources/intel/game/src/cipher.cpp:322: undefined reference to `CryptoPP::Integer::Integer(char const*, CryptoPP::ByteOrder)' /usr/local/bin/ld: /sources/intel/game/src/cipher.cpp:324: undefined reference to `CryptoPP::Integer::Integer(char const*, CryptoPP::ByteOrder)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x158): undefined reference to `CryptoPP::RandomNumberGenerator::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_3TEA3EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_3TEA3EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x158): undefined reference to `CryptoPP::RandomNumberGenerator::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_8Blowfish4BaseEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_8Blowfish4BaseEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x158): undefined reference to `CryptoPP::RandomNumberGenerator::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_3RC53EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_3RC53EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x158): undefined reference to `CryptoPP::RandomNumberGenerator::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_4SEED4BaseEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_4SEED4BaseEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x158): undefined reference to `CryptoPP::RandomNumberGenerator::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_8Camellia4BaseEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_8Camellia4BaseEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x158): more undefined references to `CryptoPP::RandomNumberGenerator::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' follow /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP20AutoSeededRandomPoolE[_ZTVN8CryptoPP20AutoSeededRandomPoolE]+0x30): undefined reference to `CryptoPP::RandomPool::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' collect2: error: ld returned 1 exit status I mean, way less undefined references but still.. EDIT: cat /usr/local/lib/libcryptopp.so.5.6.5 | grep -a CryptoPP::Integer::Integer finds nothing cat /sources/extern/lib/libcryptopp.a | grep -a CryptoPP::Integer::Integer finds something Maybe I should just remove cryptopp from the server, but since it still wants the include from usr/local/include, I copied all the files from extern and, the undefined references get shorter. Wow! /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_7SHACAL23EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x15c): undefined reference to `CryptoPP::RandomNumberGenerator::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_3TEA3EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_3TEA3EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x15c): undefined reference to `CryptoPP::RandomNumberGenerator::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_8Blowfish4BaseEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_8Blowfish4BaseEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x15c): undefined reference to `CryptoPP::RandomNumberGenerator::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_3RC53EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_3RC53EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x15c): undefined reference to `CryptoPP::RandomNumberGenerator::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_4SEED4BaseEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_4SEED4BaseEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x15c): undefined reference to `CryptoPP::RandomNumberGenerator::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_8Camellia4BaseEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE[_ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_8Camellia4BaseEEENS_20ConcretePolicyHolderINS_5EmptyENS_22AdditiveCipherTemplateINS_20AbstractPolicyHolderINS_28AdditiveCipherAbstractPolicyENS_14CTR_ModePolicyEEEEESA_EEEE]+0x15c): more undefined references to `CryptoPP::RandomNumberGenerator::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' follow /usr/local/bin/ld: ../../build/obj/game/cipher.o:(.rodata._ZTVN8CryptoPP20AutoSeededRandomPoolE[_ZTVN8CryptoPP20AutoSeededRandomPoolE]+0x34): undefined reference to `CryptoPP::RandomPool::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)' collect2: error: ld returned 1 exit status Which is bs, it's totally in the library. Link to comment Share on other sites More sharing options...
Honorable Member Distraught 5905 Posted December 11, 2019 Honorable Member Share Posted December 11, 2019 Are the libraries listed after the object files of your executable? Because linking in gcc is working like it throws away everything else except for what it actually needs. So if your library is before the object files, it won’t link anything from them because there’s no dependency yet. Try something like g++ x.o y.o z.o -l:cryptopp.a Also make sure that you have the same defines related to cryptopp when building game. If it doesn’t help, take cryptopp source files and try listing them directly in the game build script, it’s called fuckin static linking. 1 Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2426 Posted December 11, 2019 Developer Share Posted December 11, 2019 The best way is to put yourself the cryptopp source in the extern into a folder "cryptopp" to copy the .h files into extern/include to build the library by running gmake CXX=g++7 and to put the library built into extern/lib that's the way My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
Premium Intel 758 Posted December 11, 2019 Author Premium Share Posted December 11, 2019 the .h files are already into extern/include (or usr/local/include/cryptopp) but the funny thing is, I tried a VM with the same version of FreeBSD of my test server, using gcc49 and I had the same problem, but I fixed it compiling the cryptopp version in the ports (5.6.2 so I was also installing the wrong one trying to use the older version, congratulations me) with make CXX=g++49 install, so I guess now the next step is trying with cryptopp7.0 Link to comment Share on other sites More sharing options...
Premium Intel 758 Posted December 13, 2019 Author Premium Share Posted December 13, 2019 So, compiling cryptopp7.0 still gets some problems, therefore I downloaded the VM by blackdragonx, which uses FBSD 9.2 64bit with files who compile with c++17, gcc7 and cryptopp7.0. I found the only difference is GetBlockSize(); instead of GetIVLength(); (:199 & :204) in cipher.cpp and #include <cryptopp/cryptoppLibLink.h> in cipher.h which, funnily enough doesn't exist in cryptopp7.0 source code ( This is the hidden content, please Sign In or Sign Up this stupid header is only in the metin2 extern files) So, first thing, I compiled cryptopp 5.6.2 (gcc base aka 4.2) and tried to compile my files with gcc49 and..it worked. Good! Then, I compiled cryptopp 5.6.2 with gcc7 (needs to change static int to static unsigned int in wake.cpp:34) but this didn't work at all, geez. Ok then, tried the distraught's solution and put the compilation of libcryptopp into the Makefile after libthecore, changed the game makefile #CRYPTOPP INCDIR += -L../../libcryptopp/src LIBDIR += -L../../libcryptopp/src LIBS += -l:libcryptopp.a and now it f works, with crypto 5.6.2 and honestly, I cba with cryptopp7.0. Though, it compiled crypto with g++ (4.2) (despite changing CXX into GNUMakefile of libcryptopp) 18 4 1 8 6 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now