g++ is OK while gcc is failed

[test.cpp]

#include <iostream>
using namespace std;

int main(void)
{
cout << "hello" << endl;
return 0;
}

I tried this
1 g++ test.cpp -o test // It's OK

2 gcc test.cpp -o test // Failed

/tmp/ccriZviL.o(.text+0x14): In function `main':
: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
/tmp/ccriZviL.o(.text+0x21): In function `main':
: undefined reference to `std::cout'
/tmp/ccriZviL.o(.text+0x26): In function `main':
: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/ccriZviL.o(.text+0x2f): In function `main':
: undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))'
/tmp/ccriZviL.o(.text+0x5c): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `std::ios_base::Init::Init[in-charge]()'
/tmp/ccriZviL.o(.text+0x8b): In function `__tcf_0':
: undefined reference to `std::ios_base::Init::~Init [in-charge]()'
/tmp/ccriZviL.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status

In my case, I am only allowed to use gcc.
How to use gcc to let the compilation & link pass? Any comiple/link arguments needed?

Thanks.

libstdc++ hasn't been linked, so

$ gcc test.cpp -lstdc++ -o test

Why is it that you can only use gcc? Sounds like homework....

Thank you, Hitori.