I'm getting started learning c++ project building on linux with simple hello world code.
#include <iostream>
int main(){
std::cout<<"hello,world"<<std::endl;
return 0;
}
When I try to run command
g++ hello.cpp
It fails with:
/opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/ld: cannot find /usr/lib64/libmvec_nonshared.a
/opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/ld: cannot find /lib64/libmvec.so.1
But when I try
gcc -lstdc++ hello.cpp
The compilation is successfully finished and generated executable file a.out.
So what is problem here with g++?