Hi, I am trying to run a C++ code from my terminal but keep running into problems.
For instance, when I tried to run a basic Hello World code:
gcc hello_world.cpp,
I end up with the following error message:
/usr/bin/ld: Undefined symbols:
std::ios_base::Init::Init()
std::ios_base::Init::~Init()
std::cout
std::basic_ostream<char, std::char_traits<char> >& std:
perator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
___gxx_personality_v0
collect2: ld returned 1 exit status
Even when I run a dummy code that does absolutely nothing, I get an error saying Undefined symbols: _main. I don't know what to do. Any suggestions? Thanks!
For instance, when I tried to run a basic Hello World code:
gcc hello_world.cpp,
I end up with the following error message:
/usr/bin/ld: Undefined symbols:
std::ios_base::Init::Init()
std::ios_base::Init::~Init()
std::cout
std::basic_ostream<char, std::char_traits<char> >& std:
___gxx_personality_v0
collect2: ld returned 1 exit status
Even when I run a dummy code that does absolutely nothing, I get an error saying Undefined symbols: _main. I don't know what to do. Any suggestions? Thanks!