Can't compile a macro file

Try to compile the above file via script

g++ -o ExampleMacro_GUI ExampleMacro.C root-config --cflags --libs

but there are shown the error that

variable ‘TApplication app’ has initializer but incomplete type
74 | TApplication app(“ROOT Application”, &argc, argv);

What’s wrong ?

ExampleMacro.C (2.2 KB)

Add

#include "TApplication.h"

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.