Hello!
I am having trouble compiling an example source code that I know can be compiled by my colleague. I’ve attached the example source code (unfortunately the n-tuple 161992.root is too big and the extension .sh is not allowed). You can compile the example by typing in terminal or making this a bash script:
“g++ example.cc -I$ROOTSYS/include root-config --libs --glibs
-o example”
I am using ROOT 5.28/00g and am on a MAC OS X with a version of g++ downloaded from Xcode.
Thank you and I will greatly appreciate any help that can be provided.
David
Here is the error that I receive:
ld: warning: ignoring file /Applications/root28/lib/libCore.so, file was built for unsupported file format ( 0xce 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 0 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (x86_64): /Applications/root28/lib/libCore.so
ld: warning: ignoring file /Applications/root28/lib/libCint.so, file was built for unsupported file format ( 0xce 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 0 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (x86_64): /Applications/root28/lib/libCint.so
ld: warning: ignoring file /Applications/root28/lib/libRIO.so, file was built for unsupported file format ( 0xce 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 0 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (x86_64): /Applications/root28/lib/libRIO.so
…
(A lot of other warnings for other root libraries that I have not included)
…
ld: warning: ignoring file /Applications/root28/lib/libGui.so, file was built for unsupported file format ( 0xce 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 0 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (x86_64): /Applications/root28/lib/libGui.so
Undefined symbols for architecture x86_64:
“TApplication::TApplication(char const*, int*, char**, void*, int)”, referenced from:
_main in cc31PZUE.o
“TVersionCheck::TVersionCheck(int)”, referenced from:
__static_initialization_and_destruction_0(int, int)in cc31PZUE.o
“TApplicationImp::ShowMembers(TMemberInspector&)”, referenced from:
vtable for TApplicationImpin cc31PZUE.o
“TApplicationImp::Class()”, referenced from:
TApplicationImp::IsA() const in cc31PZUE.o
“TApplicationImp::Streamer(TBuffer&)”, referenced from:
vtable for TApplicationImpin cc31PZUE.o
“TFile::TFile(char const*, char const*, char const*, int)”, referenced from:
_main in cc31PZUE.o
“TClass::GetClass(std::type_info const&, bool, bool)”, referenced from:
int TTree::SetBranchAddress<std::vector<float, std::allocator > >(char const*, std::vector<float, std::allocator >, TBranch)in cc31PZUE.o
“TObject::operator delete(void*)”, referenced from:
_main in cc31PZUE.o
“TString::~TString()”, referenced from:
TApplicationImp::~TApplicationImp()in cc31PZUE.o
TApplicationImp::~TApplicationImp()in cc31PZUE.o
“TStorage::ObjectAlloc(unsigned long)”, referenced from:
TObject::operator new(unsigned long)in cc31PZUE.o
“TDataType::GetType(std::type_info const&)”, referenced from:
int TTree::SetBranchAddress<std::vector<float, std::allocator > >(char const*, std::vector<float, std::allocator >, TBranch)in cc31PZUE.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
example.cc (841 Bytes)