Hello everyone,
I wanted to use the compiler flags that GNU provides us with. More specifically I wanted to use the flags and sanitizers that errichto has mentioned here for debugging purposes.
So I’m using this build file from whatever knowledge I have gained.
{
"cmd": ["g++.exe","-Wall", "-Wshadow", "-ansi", "-std=c++17", "-O2", "${file}", "-o", "%e", "-g", "-fsanitize=address", "-fsanitize=undefined", "-D_GLIBCXX_DEBUG", "${file_base_name}.exe"],
"shell":true,
"working_dir":"$file_path",
"selector":"source.cpp"
}
And it’s giving me this huge error:
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: Dwarf Error: Could not find abbrev number 84.
2.exe:cygming-crtbegin.c:(.text+0x2a0): multiple definition of `_mingw32_init_mainargs'
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../crt2.o:(.text+0x2a0): first defined here
........
And I am using windows 10 with MinGW 64 installed.
Please help me with correcting the build file while keeping the sanitizers.