cmake_minimum_requiredVERSION 26ifTEST_CPP projectmbed TLS C CXXelse projectmbed TLS CendifoptionUSE_PKCS11_HELPER_LIBRARY Build mbed TLS with the pkcs11-helper library OFFoptionENABLE_ZLIB_SUPP
To remove the dependency on libgcc_s_dw2-1.dll in the cmake file, you can modify the CMAKE_C_FLAGS variable.
Replace the line: set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -W -Wdeclaration-after-statement -Wwrite-strings")
with: set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -W -Wdeclaration-after-statement -Wwrite-strings -static-libgcc")
This will add the flag -static-libgcc to the CMAKE_C_FLAGS variable, which will statically link libgcc into the executable, removing the dependency on libgcc_s_dw2-1.dll.
AI 优化版
原文地址:https://www.cveoy.top/t/topic/i13j 著作权归作者所有。请勿转载和采集!