我正在使用Clion,并且我想使用ASAN地址杀毒程序,当我在这里使用ASAN编译文件时,我得到了以下错误:
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lasan
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lubsan
以下是我的CMakeLists.txt内容:
cmake_minimum_required(VERSION 3.17)
project(untitled3)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-Wall -Werror -Wsign-compare")
set(CMAKE_CXX_FLAGS_ASAN "-g -fsanitize=address,undefined -fno-sanitize-recover=all"
CACHE STRING "Compiler flags in asan build"
FORCE)
add_executable(untitled3 BinarySearchEasy.cpp)
发布于 2021-04-20 03:36:16
尚未为MinGW:https://github.com/msys2/MINGW-packages/issues/3163启用杀毒程序
https://stackoverflow.com/questions/67167685
复制相似问题