Error while make in pythia 8186 using ROOT 5.34

i have ubuntu 14.04
i have generated a LHE file in madgraph and want to hadronize it and want trees of events.
hadronization have been done by me but when i use it with root i got the following errors…
amandeep@amandeep-Vostro-2420:~/pythia8186/examples$ g++ (root-config --glibs) -o mymain03 mymain03.cc (root-config --cflags) -O2 -ansi -pedantic -Wshadow -I$PYTHIA8/include
In file included from /home/amandeep/root/include/TObject.h:31:0,
from /home/amandeep/root/include/TNamed.h:26,
from /home/amandeep/root/include/TBranch.h:28,
from /home/amandeep/root/include/TTree.h:30,
from mymain03.cc:3:
/home/amandeep/root/include/Rtypes.h:156:43: warning: use of C++0x long long integer constant [-Wlong-long]
const ULong64_t kMaxULong64 = ULong64_t(~0LL);
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TObject.h:75:27: note: in expansion of macro ‘BIT’
kCanDelete = BIT(0), // if object in a list can be deleted
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TObject.h:76:27: note: in expansion of macro ‘BIT’
kMustCleanup = BIT(3), // if object destructor must call RecursiveRemove()
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TObject.h:77:27: note: in expansion of macro ‘BIT’
kObjInCanvas = BIT(3), // for backward compatibility only, use kMustCleanup
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TObject.h:78:27: note: in expansion of macro ‘BIT’
kIsReferenced = BIT(4), // if object is referenced by a TRef or TRefArray
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TObject.h:79:27: note: in expansion of macro ‘BIT’
kHasUUID = BIT(5), // if object has a TUUID (its fUniqueID=UUIDNumber)
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TObject.h:80:27: note: in expansion of macro ‘BIT’
kCannotPick = BIT(6), // if object in a pad cannot be picked
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TObject.h:81:27: note: in expansion of macro ‘BIT’
kNoContextMenu = BIT(8), // if object does not want context menu
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TObject.h:82:27: note: in expansion of macro ‘BIT’
kInvalidObject = BIT(13) // if object ctor succeeded but object should not be used
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TObject.h:95:24: note: in expansion of macro ‘BIT’
kSingleKey = BIT(0), // write collection with single key
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TObject.h:96:24: note: in expansion of macro ‘BIT’
kOverwrite = BIT(1), // overwrite existing object with same name
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TObject.h:97:24: note: in expansion of macro ‘BIT’
kWriteDelete = BIT(2) // write object, then delete previous key with same name
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TBuffer.h:71:22: note: in expansion of macro ‘BIT’
enum { kIsOwner = BIT(16) }; //if set TBuffer owns fBuffer
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TBuffer.h:72:46: note: in expansion of macro ‘BIT’
enum { kCannotHandleMemberWiseStreaming = BIT(17)}; //if set TClonesArray should not use member wise streaming
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TCollection.h:60:22: note: in expansion of macro ‘BIT’
enum { kIsOwner = BIT(14) };
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TBranch.h:52:32: note: in expansion of macro ‘BIT’
const Int_t kDoNotProcess = BIT(10); // Active bit for branches
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TBranch.h:53:32: note: in expansion of macro ‘BIT’
const Int_t kIsClone = BIT(11); // to indicate a TBranchClones
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TBranch.h:54:32: note: in expansion of macro ‘BIT’
const Int_t kBranchObject = BIT(12); // branch is a TObject*
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TBranch.h:55:32: note: in expansion of macro ‘BIT’
const Int_t kBranchAny = BIT(17); // branch is an object*
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TBranch.h:64:21: note: in expansion of macro ‘BIT’
kAutoDelete = BIT(15),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TBranch.h:65:28: note: in expansion of macro ‘BIT’
kDoNotUseBufferMap = BIT(22) // If set, at least one of the entry in the branch will use the buffer’s map of classname and objects.
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TClass.h:82:26: note: in expansion of macro ‘BIT’
enum { kClassSaved = BIT(12), kIgnoreTObjectStreamer = BIT(15),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TClass.h:82:60: note: in expansion of macro ‘BIT’
enum { kClassSaved = BIT(12), kIgnoreTObjectStreamer = BIT(15),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TClass.h:83:26: note: in expansion of macro ‘BIT’
kUnloaded = BIT(16), kIsTObject = BIT(17),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TClass.h:83:48: note: in expansion of macro ‘BIT’
kUnloaded = BIT(16), kIsTObject = BIT(17),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TClass.h:84:26: note: in expansion of macro ‘BIT’
kIsForeign = BIT(18), kIsEmulation = BIT(19),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TClass.h:84:50: note: in expansion of macro ‘BIT’
kIsForeign = BIT(18), kIsEmulation = BIT(19),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TClass.h:85:31: note: in expansion of macro ‘BIT’
kStartWithTObject = BIT(20), // see comments for IsStartingWithTObject()
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TClass.h:86:26: note: in expansion of macro ‘BIT’
kWarned = BIT(21),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TClass.h:87:29: note: in expansion of macro ‘BIT’
kHasNameMapNode = BIT(22)
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TClass.h:230:22: note: in expansion of macro ‘BIT’
enum { kLoading = BIT(14) };
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:200:28: note: in expansion of macro ‘BIT’
kFindBranch = BIT(0),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:201:28: note: in expansion of macro ‘BIT’
kFindLeaf = BIT(1),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:202:28: note: in expansion of macro ‘BIT’
kGetAlias = BIT(2),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:203:28: note: in expansion of macro ‘BIT’
kGetBranch = BIT(3),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:204:28: note: in expansion of macro ‘BIT’
kGetEntry = BIT(4),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:205:28: note: in expansion of macro ‘BIT’
kGetEntryWithIndex = BIT(5),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:206:28: note: in expansion of macro ‘BIT’
kGetFriend = BIT(6),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:207:28: note: in expansion of macro ‘BIT’
kGetFriendAlias = BIT(7),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:208:28: note: in expansion of macro ‘BIT’
kGetLeaf = BIT(8),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:209:28: note: in expansion of macro ‘BIT’
kLoadTree = BIT(9),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:210:28: note: in expansion of macro ‘BIT’
kPrint = BIT(10),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:211:28: note: in expansion of macro ‘BIT’
kRemoveFriend = BIT(11),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:212:28: note: in expansion of macro ‘BIT’
kSetBranchStatus = BIT(12)
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:233:22: note: in expansion of macro ‘BIT’
kForceRead = BIT(11),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TTree.h:234:22: note: in expansion of macro ‘BIT’
kCircular = BIT(12)
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TDirectoryFile.h:58:29: note: in expansion of macro ‘BIT’
enum { kCloseDirectory = BIT(7) };
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TMap.h:55:27: note: in expansion of macro ‘BIT’
enum { kIsOwnerValue = BIT(15) };
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TUrl.h:62:45: note: in expansion of macro ‘BIT’
enum EStatusBits { kUrlWithDefaultPort = BIT(14), kUrlHasDefaultPort = BIT(15) };
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TUrl.h:62:75: note: in expansion of macro ‘BIT’
enum EStatusBits { kUrlWithDefaultPort = BIT(14), kUrlHasDefaultPort = BIT(15) };
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TFile.h:161:24: note: in expansion of macro ‘BIT’
kRecovered = BIT(10),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TFile.h:162:24: note: in expansion of macro ‘BIT’
kHasReferences = BIT(11),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TFile.h:163:24: note: in expansion of macro ‘BIT’
kDevNull = BIT(12),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TFile.h:164:24: note: in expansion of macro ‘BIT’
kWriteError = BIT(14), // BIT(13) is taken up by TObject
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TFile.h:165:24: note: in expansion of macro ‘BIT’
kBinaryFile = BIT(15),
^
/home/amandeep/root/include/Rtypes.h:166:23: warning: use of C++0x long long integer constant [-Wlong-long]
#define BIT(n) (1ULL << (n))
^
/home/amandeep/root/include/TFile.h:166:24: note: in expansion of macro ‘BIT’
kRedirected = BIT(16)
^
/home/amandeep/root/include/Rtypes.h:93:14: warning: ISO C++ 1998 does not support ‘long long’ [-Wlong-long]
typedef long long Long64_t; //Portable signed long integer 8 bytes
^
/home/amandeep/root/include/Rtypes.h:94:23: warning: ISO C++ 1998 does not support ‘long long’ [-Wlong-long]
typedef unsigned long long ULong64_t;//Portable unsigned long integer 8 bytes
^
In file included from /home/amandeep/root/include/TNamed.h:29:0,
from /home/amandeep/root/include/TBranch.h:28,
from /home/amandeep/root/include/TTree.h:30,
from mymain03.cc:3:
/home/amandeep/root/include/TString.h: In member function ‘TString& TString::operator+=(Long64_t)’:
/home/amandeep/root/include/TString.h:537:24: warning: ISO C++98 does not support the ‘ll’ gnu_printf length modifier [-Wformat=]
sprintf(s, “%lld”, l);
^
/home/amandeep/root/include/TString.h: In member function ‘TString& TString::operator+=(ULong64_t)’:
/home/amandeep/root/include/TString.h:545:25: warning: ISO C++98 does not support the ‘ll’ gnu_printf length modifier [-Wformat=]
sprintf(s, “%llu”, ul);
^
/tmp/ccp3KEMk.o: In function main': mymain03.cc:(.text.startup+0x3f): undefined reference toPythia8::Pythia::Pythia(std::string, bool)’
mymain03.cc:(.text.startup+0x86): undefined reference to Pythia8::Pythia::readString(std::string, bool)' mymain03.cc:(.text.startup+0xc9): undefined reference toPythia8::Pythia::readString(std::string, bool)’
mymain03.cc:(.text.startup+0x10c): undefined reference to Pythia8::Pythia::readString(std::string, bool)' mymain03.cc:(.text.startup+0x127): undefined reference toPythia8::Pythia::init()’
mymain03.cc:(.text.startup+0x153): undefined reference to TFile::Open(char const*, char const*, char const*, int, int)' mymain03.cc:(.text.startup+0x16e): undefined reference toTStorage::ObjectAlloc(unsigned int)’
mymain03.cc:(.text.startup+0x192): undefined reference to TTree::TTree(char const*, char const*, int)' mymain03.cc:(.text.startup+0x1ae): undefined reference toTBuffer::GetClass(std::type_info const&)’
mymain03.cc:(.text.startup+0x1f4): undefined reference to Pythia8::Pythia::next()' mymain03.cc:(.text.startup+0x235): undefined reference toPythia8::Pythia::readString(std::string, bool)’
mymain03.cc:(.text.startup+0x250): undefined reference to Pythia8::Pythia::init()' mymain03.cc:(.text.startup+0x265): undefined reference toPythia8::Pythia::stat()’
mymain03.cc:(.text.startup+0x2bb): undefined reference to Pythia8::Pythia::~Pythia()' mymain03.cc:(.text.startup+0x31a): undefined reference toPythia8::Pythia::~Pythia()’
mymain03.cc:(.text.startup+0x33d): undefined reference to TObject::operator delete(void*)' /tmp/ccp3KEMk.o: In function_GLOBAL__sub_I_main’:
mymain03.cc:(.text.startup+0x3eb): undefined reference to `TVersionCheck::TVersionCheck(int)’
collect2: error: ld returned 1 exit status

I am attaching the code also.
mymain03.cc (837 Bytes)

You need to add the Pythia8 libraries in your compile/link statement. Something like

`$PYTHIA8/bin/pythia8-config --libs`

would do it. Or explicitly

-L$PYTHIA8/lib -lpythia8 -llhapdfdummy