Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22040

GCC on Windows: Using Address Sanitizer

$
0
0

I'm using WinLibs standalone build of GCC and MinGW-w64 for Windows.
When I add -fsanitize=address compiler option, I get a linker error for asan library.

Here is the command line which I'm using to compile my program:

g++ -fsanitize=address -g -Wall -Wextra -pedantic -std=c++20 .\test.cpp

And here is the error:

C:/sw/gcc-13.1.0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lasan: No such file or directorycollect2.exe: error: ld returned 1 exit status

How can I resolve this linker error?


Viewing all articles
Browse latest Browse all 22040

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>