When use command gcc -o xxx xxx.cc
or gcc -o xxx xxx.cpp
and fail with like
undefined reference to operator new[](unsigned long long)'
collect2.exe: error: ld returned 1 exit status
Only use g++
instead.
g++ is for C++ and gcc for C.
When use command gcc -o xxx xxx.cc
or gcc -o xxx xxx.cpp
and fail with like
undefined reference to operator new[](unsigned long long)'
collect2.exe: error: ld returned 1 exit status
Only use g++
instead.
g++ is for C++ and gcc for C.
本文标题:Ubuntu gcc g++
本文链接:https://www.haomeiwen.com/subject/tewirqtx.html
网友评论