关于使用vscode配置编译时编译失败
  • 板块灌水区
  • 楼主吴思诚
  • 当前回复2
  • 已保存回复2
  • 发布时间2024/7/17 20:12
  • 上次更新2024/7/17 21:16:21
查看原帖
关于使用vscode配置编译时编译失败
371848
吴思诚楼主2024/7/17 20:12

如图,在 tasks.json 中加上14行语句前编译正常。 加上后:

报错信息:

d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crtexe.c:(.text+0xed): multiple definition of `WinMainCRTStartup'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.text+0xed): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crtexe.c:(.text+0x11c): multiple definition of `mainCRTStartup'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.text+0x11c): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crtexe.c:(.text+0x670): multiple definition of `atexit'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.text+0x670): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:cygming-crtbeg:(.text+0x6c0): multiple definition of `__gcc_register_frame'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/crtbegin.o:cygming-crtbeg:(.text+0x20): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:cygming-crtbeg:(.text+0x770): multiple definition of `__gcc_deregister_frame'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/crtbegin.o:cygming-crtbeg:(.text+0xd0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `rnd(unsigned int&)':
C:/Users/20144/Desktop/code/std.cpp:4: multiple definition of `rnd(unsigned int&)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:4: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `IO::read()':
C:/Users/20144/Desktop/code/std.cpp:16: multiple definition of `IO::read()'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:16: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `IO::putc(char)':
C:/Users/20144/Desktop/code/std.cpp:27: multiple definition of `IO::putc(char)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:27: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `IO::write(char)':
C:/Users/20144/Desktop/code/std.cpp:28: multiple definition of `IO::write(char)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:28: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `IO::flush()':
C:/Users/20144/Desktop/code/std.cpp:39: multiple definition of `IO::flush()'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:39: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `heap::heap(bool)':
C:/Users/20144/Desktop/code/std.cpp:51: multiple definition of `heap::heap(bool)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:51: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `heap::up(unsigned int)':
C:/Users/20144/Desktop/code/std.cpp:58: multiple definition of `heap::up(unsigned int)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:58: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `heap::down(unsigned int)':
C:/Users/20144/Desktop/code/std.cpp:63: multiple definition of `heap::down(unsigned int)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:63: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `heap::push(unsigned int)':
C:/Users/20144/Desktop/code/std.cpp:72: multiple definition of `heap::push(unsigned int)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:72: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `heap::del(unsigned int)':
C:/Users/20144/Desktop/code/std.cpp:76: multiple definition of `heap::del(unsigned int)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:76: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `heap::pop()':
C:/Users/20144/Desktop/code/std.cpp:81: multiple definition of `heap::pop()'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:81: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `heap::peak()':
C:/Users/20144/Desktop/code/std.cpp:84: multiple definition of `heap::peak()'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:84: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `heap::sswap(bool, unsigned int, unsigned int)':
C:/Users/20144/Desktop/code/std.cpp:93: multiple definition of `heap::sswap(bool, unsigned int, unsigned int)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:93: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `PUSH(unsigned int)':
C:/Users/20144/Desktop/code/std.cpp:101: multiple definition of `PUSH(unsigned int)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:101: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `main':
C:/Users/20144/Desktop/code/std.cpp:106: multiple definition of `main'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:106: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `int&& std::forward<int>(std::remove_reference<int>::type&)':
d:/mingw64/include/c++/9.5.0/bits/move.h:74: multiple definition of `int&& std::forward<int>(std::remove_reference<int>::type&)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:d:/mingw64/include/c++/9.5.0/bits/move.h:74: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `std::pair<unsigned int, unsigned int>::pair<unsigned int&, unsigned int&, true>(unsigned int&, unsigned int&)':
d:/mingw64/include/c++/9.5.0/bits/stl_pair.h:341: multiple definition of `std::pair<unsigned int, unsigned int>::pair<unsigned int&, unsigned int&, true>(unsigned int&, unsigned int&)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:d:/mingw64/include/c++/9.5.0/bits/stl_pair.h:341: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `std::pair<unsigned int, unsigned int>::pair<int, int, true>(int&&, int&&)':
d:/mingw64/include/c++/9.5.0/bits/stl_pair.h:341: multiple definition of `std::pair<unsigned int, unsigned int>::pair<int, int, true>(int&&, int&&)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:d:/mingw64/include/c++/9.5.0/bits/stl_pair.h:341: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `std::remove_reference<unsigned int&>::type&& std::move<unsigned int&>(unsigned int&)':
d:/mingw64/include/c++/9.5.0/bits/move.h:99: multiple definition of `std::remove_reference<unsigned int&>::type&& std::move<unsigned int&>(unsigned int&)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:d:/mingw64/include/c++/9.5.0/bits/move.h:99: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<unsigned int> >, std::is_move_constructible<unsigned int>, std::is_move_assignable<unsigned int> >::value, void>::type std::swap<unsigned int>(unsigned int&, unsigned int&)':
d:/mingw64/include/c++/9.5.0/bits/move.h:182: multiple definition of `std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<unsigned int> >, std::is_move_constructible<unsigned int>, std::is_move_assignable<unsigned int> >::value, void>::type std::swap<unsigned int>(unsigned int&, unsigned int&)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:d:/mingw64/include/c++/9.5.0/bits/move.h:182: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `void IO::read<unsigned int>(unsigned int&)':
C:/Users/20144/Desktop/code/std.cpp:18: multiple definition of `void IO::read<unsigned int>(unsigned int&)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:18: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `void IO::write<unsigned int>(char, unsigned int&)':
C:/Users/20144/Desktop/code/std.cpp:30: multiple definition of `void IO::write<unsigned int>(char, unsigned int&)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:30: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe: in function `unsigned int& std::forward<unsigned int&>(std::remove_reference<unsigned int&>::type&)':
d:/mingw64/include/c++/9.5.0/bits/move.h:74: multiple definition of `unsigned int& std::forward<unsigned int&>(std::remove_reference<unsigned int&>::type&)'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:d:/mingw64/include/c++/9.5.0/bits/move.h:74: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:C:/Users/20144/Desktop/code/std.cpp:92: multiple definition of `b'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:92: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x4e0): multiple definition of `.refptr.__mingw_initltsdrot_force'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__mingw_initltsdrot_force[.refptr.__mingw_initltsdrot_force]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x530): multiple definition of `.refptr.__native_startup_state'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__native_startup_state[.refptr.__native_startup_state]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x470): multiple definition of `.refptr.__globallocalestatus'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__globallocalestatus[.refptr.__globallocalestatus]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:cygming-crtbeg:(.bss+0x1000a8): multiple definition of `IO::iS'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:std.cpp:(.bss+0x100028): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crtexe.c:(.bss+0x0): multiple definition of `__mingw_module_is_dll'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.bss+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:cygming-crtbeg:(.bss+0x80): multiple definition of `IO::len'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:std.cpp:(.bss+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x490): multiple definition of `.refptr.__imp___initenv'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__imp___initenv[.refptr.__imp___initenv]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x5c0): multiple definition of `.refptr._matherr'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr._matherr[.refptr._matherr]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x590): multiple definition of `.refptr._dowildcard'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr._dowildcard[.refptr._dowildcard]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x4d0): multiple definition of `.refptr.__mingw_app_type'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__mingw_app_type[.refptr.__mingw_app_type]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:cygming-crtbeg:(.bss+0x21000e0): multiple definition of `IO::ar'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:std.cpp:(.bss+0x2100060): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x510): multiple definition of `.refptr.__mingw_oldexcpt_handler'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__mingw_oldexcpt_handler[.refptr.__mingw_oldexcpt_handler]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x560): multiple definition of `.refptr.__xi_a'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__xi_a[.refptr.__xi_a]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crtexe.c:(.text+0x6a0): multiple definition of `.weak.__register_frame_info.hmod_libgcc'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/crtbegin.o:cygming-crtbeg:(.text+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x5d0): multiple definition of `.refptr._newmode'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr._newmode[.refptr._newmode]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x500): multiple definition of `.refptr.__mingw_initltssuo_force'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__mingw_initltssuo_force[.refptr.__mingw_initltssuo_force]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x520): multiple definition of `.refptr.__native_startup_lock'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__native_startup_lock[.refptr.__native_startup_lock]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x460): multiple definition of `.refptr.__dyn_tls_init_callback'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__dyn_tls_init_callback[.refptr.__dyn_tls_init_callback]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x4f0): multiple definition of `.refptr.__mingw_initltsdyn_force'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__mingw_initltsdyn_force[.refptr.__mingw_initltsdyn_force]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crtexe.c:(.data+0x0): multiple definition of `__mingw_winmain_nShowCmd'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.data+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x5b0): multiple definition of `.refptr._gnu_exception_handler'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr._gnu_exception_handler[.refptr._gnu_exception_handler]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crtexe.c:(.CRT+0x20): multiple definition of `__mingw_pcinit'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.CRT$XIAA+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crtexe.c:(.text+0x6b0): multiple definition of `.weak.__deregister_frame_info.hmod_libgcc'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/crtbegin.o:cygming-crtbeg:(.text+0x10): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:cygming-crtbeg:(.bss+0x1000b0): multiple definition of `IO::iT'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:std.cpp:(.bss+0x100030): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x580): multiple definition of `.refptr._commode'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr._commode[.refptr._commode]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crtexe.c:(.CRT+0x8): multiple definition of `__mingw_pcppinit'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.CRT$XCAA+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:C:/Users/20144/Desktop/code/std.cpp:92: multiple definition of `s'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:C:/Users/20144/Desktop/code/std.cpp:92: first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:cygming-crtbeg:(.bss+0x1000c0): multiple definition of `IO::out'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:std.cpp:(.bss+0x100040): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x480): multiple definition of `.refptr.__image_base__'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__image_base__[.refptr.__image_base__]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x5a0): multiple definition of `.refptr._fmode'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr._fmode[.refptr._fmode]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x540): multiple definition of `.refptr.__xc_a'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__xc_a[.refptr.__xc_a]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:cygming-crtbeg:(.bss+0xa0): multiple definition of `IO::ibuf'; C:\Users\20144\AppData\Local\Temp\ccpwLgKl.o:std.cpp:(.bss+0x20): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x570): multiple definition of `.refptr.__xi_z'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__xi_z[.refptr.__xi_z]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x420): multiple definition of `.refptr._MINGW_INSTALL_DEBUG_MATHERR'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr._MINGW_INSTALL_DEBUG_MATHERR[.refptr._MINGW_INSTALL_DEBUG_MATHERR]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\20144\Desktop\code/std.exe:crt_handler.c:(.rdata+0x550): multiple definition of `.refptr.__xc_z'; d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__xc_z[.refptr.__xc_z]+0x0): first defined here
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/crtbegin.o:cygming-crtbeg:(.text+0xa3): undefined reference to `__deregister_frame_info'
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe: d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.5.0/crtbegin.o:cygming-crtbeg:(.text+0xaa): undefined reference to `__register_frame_info'
collect2.exe: error: ld returned 1 exit status
生成已完成,但出现错误。

求助万能的谷民。

2024/7/17 20:12
加载中...