On Wednesday, April 6, 2016 at 12:56:13 PM UTC-4, Freddy Martinez wrote: > > Hi guys... I have the cryptopp code inside my Qt Project and before I try > to compile it with vs 2013, I always compile it with mingw and everything > was fine. Now, I had download the Qt 5.5.1 version for vs 2013 and I'm > getting this linker error: > > gcm.obj : error LNK2019: unresolved external symbol > GCM_AuthenticateBlocks_2K referenced in function "protected: virtual > unsigned __int64 __cdecl CryptoPP::GCM_Base::AuthenticateBlocks(unsigned > char const *,unsigned __int64)" > (?AuthenticateBlocks@GCM_Base@CryptoPP@@MEAA_KPEBE_K@Z) > > gcm.obj : error LNK2019: unresolved external symbol > GCM_AuthenticateBlocks_64K referenced in function "protected: virtual > unsigned __int64 __cdecl CryptoPP::GCM_Base::AuthenticateBlocks(unsigned > char const *,unsigned __int64)" > (?AuthenticateBlocks@GCM_Base@CryptoPP@@MEAA_KPEBE_K@Z)... > > sosemanuk.obj : error LNK2019: unresolved external symbol > Sosemanuk_OperateKeystream referenced in function "protected: virtual void > __cdecl CryptoPP::SosemanukPolicy::OperateKeystream(enum > CryptoPP::KeystreamOperation,unsigned char *,unsigned char const *,unsigned > __int64)" > (?OperateKeystream@SosemanukPolicy@CryptoPP@@MEAAXW4KeystreamOperation@2@PEAEPEBE_K@Z) > > ..\..\Nautam\lib\cryptopp.dll : fatal error LNK1120: 11 unresolved > externals > > jom: > C:\Users\freddy\Documents\nautam\build-nautam-kernel-Desktop_Qt_5_5_1_MSVC2013_64bit-Debug\cryptopp\Makefile.Debug > > [..\..\Nautam\lib\cryptopp.dll] Error 1120 > > jom: > C:\Users\freddy\Documents\nautam\build-nautam-kernel-Desktop_Qt_5_5_1_MSVC2013_64bit-Debug\cryptopp\Makefile > > [debug] Error 2 > > 13:45:14: The process "C:\Qt\Qt5.5.1\Tools\QtCreator\bin\jom.exe" exited > with code 2. > > Error while building/deploying project nautam-kernel (kit: Desktop Qt > 5.5.1 MSVC2013 64bit) > > When executing step "Make" > > > I have search inside the code and I've found this definition: > > > #ifdef CRYPTOPP_X64_MASM_AVAILABLE > > extern "C" { > > void GCM_AuthenticateBlocks_2K(const byte *data, size_t blocks, word64 > *hashBuffer, const word16 *reductionTable); > > void GCM_AuthenticateBlocks_64K(const byte *data, size_t blocks, word64 > *hashBuffer); > > } > > #endif > > > and before of that, in config.h I have found this piece of code: > > > #if !defined(CRYPTOPP_DISABLE_ASM) && defined(_MSC_VER) && defined(_M_X64) > > #define CRYPTOPP_X64_MASM_AVAILABLE > > #endif > > So, I'm compiling with vs 2013 for 64 bits, so, the > CRYPTOPP_X64_MASM_AVAILABLE macro is defined... until this point everything > is fine... the problem is that I can't find where is the implementation > GCM_AuthenticationBlocks_2K and GCM_AuthenticationBlocks_64K? I have a link > error because of that... > > > can anyone help with it?? > > I believe QT should be invoking MASM (ml64.exe) on x64masm.asm (http://github.com/weidai11/cryptopp/blob/master/x64masm.asm).
According to the cryptlib.proj, it should be invoked with the following defines (https://github.com/weidai11/cryptopp/blob/master/cryptlib.vcproj#L8658): /D_M_X64 /Zi Another option is to have Qt set CRYPTOPP_DISABLE_ASM to disable all the assembly language routines. Jeff -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.