Блог пользователя SuperGrover

Автор SuperGrover, история, 5 лет назад, По-английски

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!

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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.