Error when trying to compile Hugo from windows CMD

So when trying to install hugo, i needed to install golang and a tdm-gcc MinGW-w64 64-bit Edition compiler (i think its a c++ compiler).

Anyways, when I first tried to clone the git repo with: go install -tags extended github,com/gohugoio/hugo@latest

It started running, then told me i needed that compiler i mentioned above. So I downloaded it.

After that, when running that command, i get a whole mess of repeating errors:

# github,com/gohugoio/hugo
F:\Various Software\golang\pkg\tool\windows_amd64\link.exe: running g++ failed: exit status 1
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(bad_alloc.o):bad_alloc.cc:(.text$_ZNSt9bad_allocD2Ev+0x0): multiple definition of `std::bad_alloc::~bad_alloc()'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d005201.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(tinfo.o):tinfo.cc:(.text$_ZNKSt9type_infoeqERKS_+0x0): multiple definition of `std::type_info::operator==(std::type_info const&) const'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001606.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(ios-inst.o):ios-inst.cc:(.text$_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate[_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate]+0x0): multiple definition of `std::basic_ios<char, std::char_traits<char> >::clear(std::_Ios_Iostate)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d005212.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(ios-inst.o):ios-inst.cc:(.text$_ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E[_ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E]+0x0): multiple definition of `std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d005208.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(ios.o):ios.cc:(.text$_ZNSt8ios_baseC2Ev+0x0): multiple definition of `std::ios_base::ios_base()'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d005116.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(ios.o):ios.cc:(.text$_ZNSt8ios_baseD2Ev+0x0): multiple definition of `std::ios_base::~ios_base()'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d005119.o):(.text+0x0): first defined here

# Output omitted
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d005321.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(functexcept.o):functexcept.cc:(.text.unlikely._ZSt16__throw_bad_castv+0x0): multiple definition of `std::__throw_bad_cast()'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d005316.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(functexcept.o):functexcept.cc:(.text.unlikely._ZSt19__throw_logic_errorPKc+0x0): multiple definition of `std::__throw_logic_error(char const*)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d005335.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(functexcept.o):functexcept.cc:(.text.unlikely._ZSt20__throw_length_errorPKc+0x0): multiple definition of `std::__throw_length_error(char const*)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d005343.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(functexcept.o):functexcept.cc:(.text.unlikely._ZSt20__throw_out_of_rangePKc+0x0): multiple definition of `std::__throw_out_of_range(char const*)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d005344.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(functexcept.o):functexcept.cc:(.text$_ZSt24__throw_out_of_range_fmtPKcz+0x0): multiple definition of `std::__throw_out_of_range_fmt(char const*, ...)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d005359.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(iostream-inst.o):iostream-inst.cc:(.text$_ZNSdD2Ev[_ZNSdD2Ev]+0x0): multiple definition of `std::basic_iostream<char, std::char_traits<char> >::~basic_iostream()'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001768.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(istream-inst.o):istream-inst.cc:(.text$_ZNSi6sentryC1ERSib[_ZNSi6sentryC1ERSib]+0x0): multiple definition of `std::istream::sentry::sentry(std::istream&, bool)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001798.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(istream-inst.o):istream-inst.cc:(.text$_ZNSi4readEPcx[_ZNSi4readEPcx]+0x0): multiple definition of `std::istream::read(char*, long long)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001788.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(ostream-inst.o):ostream-inst.cc:(.text$_ZNSo5flushEv[_ZNSo5flushEv]+0x0): multiple definition of `std::ostream::flush()'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001833.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(ostream-inst.o):ostream-inst.cc:(.text$_ZNSo3putEc[_ZNSo3putEc]+0x0): multiple definition of `std::ostream::put(char)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001831.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(ostream-inst.o):ostream-inst.cc:(.text$_ZNSo5writeEPKcx[_ZNSo5writeEPKcx]+0x0): multiple definition of `std::ostream::write(char const*, long long)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001837.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(ostream-inst.o):ostream-inst.cc:(.text$_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x[_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x]+0x0): multiple definition of `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long long)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d005314.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(ostream-inst.o):ostream-inst.cc:(.text$_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc[_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc]+0x0): multiple definition of `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d005479.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(ostream-inst.o):ostream-inst.cc:(.text$_ZNSolsEi[_ZNSolsEi]+0x0): multiple definition of `std::ostream::operator<<(int)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001873.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(ostream-inst.o):ostream-inst.cc:(.text$_ZNSo9_M_insertImEERSoT_[_ZNSo9_M_insertImEERSoT_]+0x0): multiple definition of `std::ostream& std::ostream::_M_insert<unsigned long>(unsigned long)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001848.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(ostream-inst.o):ostream-inst.cc:(.text$_ZNSo9_M_insertIyEERSoT_[_ZNSo9_M_insertIyEERSoT_]+0x0): multiple definition of `std::ostream& std::ostream::_M_insert<unsigned long long>(unsigned long long)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001850.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(ostream-inst.o):ostream-inst.cc:(.text$_ZNSo9_M_insertIdEERSoT_[_ZNSo9_M_insertIdEERSoT_]+0x0): multiple definition of `std::ostream& std::ostream::_M_insert<double>(double)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001845.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(string-inst.o):string-inst.cc:(.text$_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERyy[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERyy]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long long&, unsigned long long)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d004449.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(string-inst.o):string-inst.cc:(.text$_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEyc[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEyc]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct(unsigned long long, char)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d004358.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(string-inst.o):string-inst.cc:(.text$_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_S_copy_charsEPcPKcS7_[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_S_copy_charsEPcPKcS7_]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy_chars(char*, char const*, char const*)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d004369.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(string-inst.o):string-inst.cc:(.text$_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d004448.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(string-inst.o):string-inst.cc:(.text$_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateEyyPKcy[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateEyyPKcy]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate(unsigned long long, unsigned long long, char const*, unsigned long long)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d004451.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(string-inst.o):string-inst.cc:(.text$_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_eraseEyy[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_eraseEyy]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_erase(unsigned long long, unsigned long long)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d004445.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(string-inst.o):string-inst.cc:(.text$_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d004460.o):(.text+0x0): first defined here
(.text$_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE16find_last_not_ofEPKcyy[_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE16find_last_not_ofEPKcyy]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_last_not_of(char const*, unsigned long long, unsigned long long) const'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001042.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(string-inst.o):string-inst.cc:(.text$_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareERKS4_[_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareERKS4_]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001076.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(string-inst.o):string-inst.cc:(.text$_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc[_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001075.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(string-inst.o):string-inst.cc:(.text$_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEyyPKc[_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEyyPKc]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(unsigned long long, unsigned long long, char const*) const'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001077.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(string-inst.o):string-inst.cc:(.text$_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_yy[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_yy]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long, unsigned long long)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d004463.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(string-inst.o):string-inst.cc:(.text$_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d004457.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(string-inst.o):string-inst.cc:(.text$_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEyy[_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEyy]+0x0): multiple definition of `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned long long, unsigned long long) const'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d001073.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(eh_catch.o):eh_catch.cc:(.text$__cxa_begin_catch+0x0): multiple definition of `__cxa_begin_catch'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d006548.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(eh_catch.o):eh_catch.cc:(.text$__cxa_end_catch+0x0): multiple definition of `__cxa_end_catch'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d006554.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(cow-stdexcept.o):cow-stdexcept.cc:(.text$_ZNSt13runtime_errorC2EPKc+0x0): multiple definition of `std::runtime_error::runtime_error(char const*)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d002950.o):(.text+0x0): first defined here
F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0\libstdc++.a(cow-stdexcept.o):cow-stdexcept.cc:(.text$_ZNSt13runtime_errorC2EPKc+0x0): multiple definition of `std::runtime_error::runtime_error(char const*)'; F:/Various Software/golang/a go like c compiler or something idfk/instl/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libstdc++.dll.a(d002945.o):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status

Googling any one of these errors did not help, I have a few other things that may point to a solution:

  • I moved the default env variable for golang cause it kept having issues where it was
  • I have Rustlang installed (googling these errors sometimes brought me to rust-related problems, so maybe its related)
  • I CAN compile and run go code.
  • I made sure that the c++ compiler thing is on my env path var.

I’d appreciate any advice or suggestions!

See https://discourse.gohugo.io/t/gcc-compiler-required-to-build-hugo-from-source-on-windows/41370

I used that last week on a virgin Windows 11 system. Install Git, install Go, then the compiler.

go install -tags extended github.com/gohugoio/hugo@latest

No problems.

Yeah I have go installed (tested with running go code), git is installed fine (i can interact with my remote repos), testing the compiler with gcc --version shows the version properly.

I tried to run the cmd with admin priv, and produced the same error.

Can you tell what the errors suggest? It seems to be the compiler at fault, but I’m not sure what it means.

In your initial post you referred to tdm-gcc. I don’t profess to have any expertise in this area, but that’s a different compiler than what I referenced in:

https://discourse.gohugo.io/t/gcc-compiler-required-to-build-hugo-from-source-on-windows/41370

And I know that works.

Update: when I try to use tdm64-gcc-10.3.0-2.exe from here the build fails.

Yes, I removed the old compiler and got the one you suggested. Now when running that command, it seems to successfully run.
So, thanks.

However, when I try to run hugo version it says that hugo is an unrecognized command. Looking online I need to have the path of hugo.exe in my path variable. however, I do not have the exe for it. I’m not sure if running the command should have created the exe somewhere, but I do not know.

When you compile it places the executable in your GOPATH/bin directory.

See item #3 here:
https://gohugo.io/installation/windows/#build-from-source

Yup! I got it all working. It might be important to other people, don’t have the complete path to the exe, just the directory for path. I think it ends with /bin/

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.