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";
	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': undefined reference to `TString::TString(char const*)' undefined reference to `operator<<(std::ostream&, TString const&)' undefined reference to `TString::~TString()' 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 root-config --libs

Thanks :blush: