Compiling ROOT as a static library

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();

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?