Hello Beautiful Codeforces community. It is me, Super Grover. I'm trying to use a debugging template, here's link to the code — https://paste.ubuntu.com/p/QV3Q7QVQcq/ (it's tourist's BTW)
I'm getting this error for some reason — ~~~~~ c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../libmingwex.a(vsnprintf.o):(.text+0x0): multiple definition of `vsnprintf'; C:\Users\sg\AppData\Local\Temp\ccBLCp1S.o:code.cpp:(.text$vsnprintf[_vsnprintf]+0x0): first defined here collect2.exe: error: ld returned 1 exit status ~~~~~
I tried reinstalling MinGW several times, nothing seems to work. Any sort of help would be highly appreciated. Thank You!
This is due to a bug in minGW.
As the linker complains there are multiple definitions of
vsnprintf
:libmingwex.a
andcstdio
(which is insidebits/stdc++.h
). you have to choose somehow either of the above definitions.Easiest solution would be to downgrade minGW. Refer this for this solution.