Compiling errors with 'root-config'

I’m trying to compile a macro with g++ using the command:

and get the following error:

[quote]g++: root-config --cflags: No such file or directory
g++: root-config --glibs: No such file or directory[/quote]

i’ve tried just typing root-config --glibs etc… and it works just fine. i also tried manually entering the linked libraries into a make file, but i just get errors of the form:

/[quote]usr/local/include/root/TROOT.h:277: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘ROOT’ [/quote] etc…

for each ROOT header that i’ve included. If i try compiling in root, using:

then i get a segmentation fault. my guess for this is because i’m loading a large root file (1.5 Gig)? but the script runs just fine if i run it normally through root. it just takes forever. Please help!! thanks,

Michael

I’m running Ubuntu 8.04 (hardy)
Root 5.18/00
g++ 4.2.3

[quote=“mobranov”]I’m trying to compile a macro with g++ using the command:

and get the following error:

[quote]g++: root-config --cflags: No such file or directory
g++: root-config --glibs: No such file or directory[/quote][/quote]

try this

note the quoting with "`"
or

or simply

g++ `root-config --cflags --glibs` myMacro.c
Rene