Compiling ROOT as a static library

Hi,
I compiled ROOT as a static library and linked it to the following simple application:

#include "TCanvas.h"
#include "TApplication.h"

int main(int argc, char** argv){
	TApplication myApp("myApp", &argc, argv);
	new TCanvas();
	myApp.Run();
}

but no canvas is showing up when I execute it. I would also like to use GUI classes within a statically linked application. Can someone point me out what I am doing wrong?
Thanks