Hi Dominique,
Depends on which platform, but if not on Windows, this command:`root-config --cflags --glibs`
Will give you the right compilation flags and set of libraries.
You can also take a look at $ROOTSYS/test/Makefile for example
And for the canvas, the same commands can be used in a compiled program than in the command line… I would say something like this:
Then it could also be declared as member of one of you classes. But this is not specific to ROOT, just create your TCanvas like any other C++ object (class). Just take a look at examples in $ROOTSYS/tutorials and $ROOTSYS/test
Cheers, Bertrand.