SuperGrover's blog

By SuperGrover, history, 4 years ago, In English

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!

  • Vote: I like it
  • +2
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

This is due to a bug in minGW.

As the linker complains there are multiple definitions of vsnprintf: libmingwex.a and cstdio (which is inside bits/stdc++.h). you have to choose somehow either of the above definitions.

Easiest solution would be to downgrade minGW. Refer this for this solution.