Problem linking root with pythia8 on lxplus

I am trying to link root with pythia8 on lxplus. When i try to compile my program using
g++ -O2 -ansi -W -Wall -Wshadow -I…/include -I/afs/ -o …/bin/ruchi3.exe
-L…/lib/archive -lpythia8 -llhapdfdummy
-L/afs/ -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -pthread -lm -ldl -rdynamic

i get this error

/usr/bin/ld: skipping incompatible /afs/ when searching for -lCore
/usr/bin/ld: cannot find -lCore
collect2: ld returned 1 exit status
make: *** [ruchi3] Error 1

Can anyone please tell me what is wrong?
Thanks in advance.


generic lxplus machines are x86_64, so try by using


instead of


G. Ganis

Thank you very much!
It works!