Compiling a macro

Hi all,

I have this macro:

[code]#include <TApplication.h>
#include <TCanvas.h>
#include <TFile.h>
#include <TTree.h>
#include <TH1F.h>
#include <TF1.h>

#include
#include
#include
#include
#include

using namespace std;
TApplication myapp(“APP”, NULL, NULL);

void plotspe(const std::string, const int, TFile*, int, float*, int);

int main(){

ecc…[/code]

I would like to compile it and execute it. What I have to do? The name of this macro is “macro1.cc

Thanks, regards

Hello, you can do in the ROOT console

.L macro1.cc++ main()

Otherwise, you can do directly

but you have to change “int main(){” by “int macro1(){”

[quote=“pamputt”]Hello, you can do in the ROOT console

.L macro1.cc++ main()

Otherwise, you can do directly

but you have to change “int main(){” by “int macro1(){”[/quote]

Sure, you’re right, my mistake.