When using the GCC compiler, the program was able to compile, but the result was problematic, I looked up a lot of places, or I didn't know where the problem was. It was later discovered that a variable was not initialized.
I felt that when using VS, I rarely delay time on this issue, so I think of the-wall parameters that are rarely used, and I compile it with the correct compiler and use the correct program, but a bunch of warnings and errors come out of the-wall. As follows:
test2:in function ' _start ':
(. text+0x0): Multiple definition of ' _start '
/lib/.. /LIB64/CRT1.O: (. text+0x0): defined here
test2:in function ' _fini ':
(. fini+0x0): Multiple definition of ' _fini '
/lib/.. /LIB64/CRTI.O: (. fini+0x0): defined here
Test2: (. rodata+0x0): Multiple definition of ' _io_stdin_used '
/lib/.. /LIB64/CRT1.O: (. rodata.cst4+0x0): defined here
test2:in function ' Data_start ':
(. data+0x0): Multiple definition of ' __data_start '
/lib/.. /LIB64/CRT1.O: (. data+0x0): defined here
test2:in function ' Data_start ':
(. data+0x8): Multiple definition of ' __dso_handle '
/USR/LOCAL/LIB/GCC/X86_64-UNKNOWN-LINUX-GNU/4.9.1/CRTBEGIN.O: (. data+0x0): defined here
test2:in function ' main ':
(. Text+0xf8): Multiple definition of ' main '
/tmp/cc89ie33.o:test2.cpp: (. text+0x0): defined here
test2:in function ' _init ':
(. init+0x0): Multiple definition of ' _init '
/lib/.. /LIB64/CRTI.O: (. init+0x0): defined here
/USR/LOCAL/LIB/GCC/X86_64-UNKNOWN-LINUX-GNU/4.9.1/CRTEND.O: (. tm_clone_table+0x0): Multiple definition of ' __TMC_ End__ '
Test2: (. data+0x10): defined here
/usr/bin/ld:error in Test2 (. eh_frame); No. EH_FRAME_HDR table would be created.
Collect2:error:ld returned 1 exit status
How to solve this problem.