Its looking to compile the Qt libraries. How do i include these on the compile line?

I have a c++ class that uses the X11 graphics libraries and my compile line is something like:

g++ -o myprog myprog.cc ccc_x11.cpp ccc_shap.cpp -L/usr/X11R6/lib -lX11

Do I need something like -L/usr/X11R6/lib -lX11 for the Qt libs?

The code looked like C, so I tried:

gcc -o chess chess.cc

and got tons of errors.

Then I tried g++ like this:

g++ -o chess chess.cc

and it can't find all the Qt #include lines!

How do i fix this?

TIA,