Hi @anwar ,
please check out Posting code? Read this first! for instructions on how to post code on the forum. I edited your previous post to make it more readable.
As far as I can tell the error is due to a broken Pythia installation. If it worked before, maybe you recently upgraded your system and need to recompile Pythia? Or maybe you installed a Pythia binary incompatible with your system.
Hi @eguiraud ,
thanks for your response and guidance,
i resolved that error but now i am facing this issue
‘’’’ root-config --cflags --glibsfastjet-config --cxxflags --pluginsfastjet-config --libs --plugins -L -Wl,-rpath, -lHepMC -lpythia8 -ldl -lLHAPDF -lTauolaCxxInterface -lTauolaFortran
/usr/lib/gcc/x86_64-linux-gnu/7/…/…/…/x86_64-linux-gnu/crt1.o: In function _start': (.text+0x20): undefined reference to main’
collect2: error: ld returned 1 exit status
makefile:25: recipe for target ‘Analysis’ failed
make: * [Analysis] Error 1
‘’’’
As i shared the Makefile above, for which i use the command make Analysis to create an .exe file for an Analysis.cc code.
but when i give the make Analysis command, it returns this error
root-config --cflags --glibs fastjet-config --cxxflags --plugins fastjet-config --libs --plugins -L -Wl,-rpath, -lHepMC -lpythia8 -ldl -lLHAPDF -lTauolaCxxInterface -lTauolaFortran
/usr/lib/gcc/x86_64-linux-gnu/7/…/…/…/x86_64-linux-gnu/crt1.o: In function _start': (.text+0x20): undefined reference to main’
collect2: error: ld returned 1 exit status
makefile:25: recipe for target ‘Analysis’ failed
make: * [Analysis] Error 1
Ok, there is an error in your Makefile, either you are compiling a library as if it was an executable (so the compiler expects a main function) or you are compiling an executable but you don’t pass the source file that contains main.
This is not strictly related to ROOT, I can suggest to use make VERBOSE=1 to see the exact compilation command that is being run and see what’s wrong with it.