Problem with compilation with g++

Hello. I try to compile my first program with g++ using ROOT classes.
This is my hello:

#include <iostream>
#include "TString.h"
using namespace std;
int main()
{
	TString text ="Hello";
	cout<<text<<endl;
	return 0;
}

I compiled it with the command:

I don’t know what is bad but this is the output:

/tmp/ccRcuNst.o: In function `main': hello.cc:(.text+0x25): undefined reference to `TString::TString(char const*)' hello.cc:(.text+0x36): undefined reference to `operator<<(std::ostream&, TString const&)' hello.cc:(.text+0x54): undefined reference to `TString::~TString()' hello.cc:(.text+0x76): undefined reference to `TString::~TString()' collect2: error: ld returned 1 exit status
What is wrong ?
For information:

navds@navds-G31T-M7 ~/Documents/Programming $ root-config --cflags --glibs
-pthread -m64 -I/home/navds/HEP/root/include -L/home/navds/HEP/root/lib -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic

For the same occasion, how can I use IDE such Code::Blocks with ROOT ?
Thanks in advance for your help.

root-config --cxx --cflags -o hello hello.cc root-config --libs

Thanks :blush: