Sublime Forum

What's wrong with this sublime build file?

#1

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.

0 Likes

#2

Someone please help me with it !!

0 Likes

#3

You might have better luck on a different forum/site. The problem you’re having isn’t directly related to Sublime Text, it’s to do with compiling using mingw.

0 Likes

#4

If that’s the case, then I am going to probably leave the build file as is.

Thanks for the advice.

0 Likes