Building cryptopp with mingw / clang under Windows

67 views
Skip to first unread message

Thomas Pierrard

unread,
Mar 11, 2024, 3:57:56 PMMar 11
to Crypto++ Users
Hello there,

I'm struggling compiling crytopp 8.9.0 (cryptopp-cmake), I would be very grateful if someone can help.

I am using CMake 3.24.2 with Ninja generator. Everything runs smoothly with mingw/gcc 11.3.0, and msvc 17 2022. But when it comes to clang... I am trying to understand why it fails.

First I had to comment the OS check "Unsupported configuration" at begining of config_os.h (I know, I am a bad guy :s)). Thus, I'm not checking anymore __clang__ and _MSC_VER values.

Both mingw/clang (14.0.3), and llvm/clang (17.0.6) compile until the linker screams at me with some undefined reference to 'CPUID64' and 'XGETBV64' (which are defined in x64dll.asm) when trying to build cryptest.exe.

I don't understand why mingw-gcc succeed to build the cryptest.exe binary but llvm-clang and mingw-clang cannot. How can I simulate gcc behavior for clang? (I mean, asking clang to not use  XGETBV64 and CPUID64)

Kind regards,
Thomas

Reply all
Reply to author
Forward
0 new messages