Closed jolaf closed 9 months ago
What compiler are you using? What is the compile command used?
Shooting from the hip it looks like you should add /wd4514
to your command line. Our cryptest.nmake
file also uses /W4 /wd4231 /wd4511 /wd4156
.
Compiler:
C:\> C:\Users\User\AppData\Local\Android\Sdk\ndk\25.2.9519653\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe -v
Android (9352603, based on r450784d1) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: C:/Users/User/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin
Command line:
C:\Users\User\AppData\Local\Android\Sdk\ndk\25.2.9519653\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe
--target=armv7-none-linux-androideabi24
--sysroot=C:/Users/User/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/sysroot
-DCRYPTOPP_DISABLE_MIXED_ASM
-IC:/Users/User/AppData/Local/Android/Sdk/ndk/25.2.9519653/sources/android/cpufeatures
-Wall
-fvisibility=hidden
-g
-DANDROID
-fdata-sections
-ffunction-sections
-funwind-tables
-fstack-protector-strong
-no-canonical-prefixes
-D_FORTIFY_SOURCE=2
-march=armv7-a
-mthumb
-Wformat
-Werror=format-security
-fvisibility=hidden
-D_DEBUG
-fno-limit-debug-info
-fPIC
-MD
-MT cryptopp.cmake/CMakeFiles/cryptopp-object.dir/.../cryptopp/cpu.cpp.o
-MF cryptopp.cmake\CMakeFiles\cryptopp-object.dir\...\cryptopp\cpu.cpp.o.d
-o cryptopp.cmake/CMakeFiles/cryptopp-object.dir/.../cryptopp/cpu.cpp.o
-c cryptopp/cpu.cpp
Andoid's NDK does not use -Wall
. You should remove it, or add -Wno-unused-function
to your command line.
Thanks, that helped!
I'm building CryptoPP 8.8.0 with CMake on Windows 10 and I see a lot of warnings (summarized below), while 8.7.0 build produces no warnings.