Message: Re: OpenGL in 4.9.5 [Continued from Visualization forum] Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: OpenGL in 4.9.5 [Continued from Visualization forum] 

Forum: Installation and Configuration
Re: None Re: OpenGL in 4.9.5 [Continued from Visualization forum] (Joel Long)
Date: 26 Jul, 2012
From: Bethany <Bethany>

Hi Joel, Thanks for your help, that CMakeLists file was very helpful. I can now run CMake to build a Makefile for my simulation. The Makefile compiles my code, but fails when it tries to link. It gives me an abundance of errors like this:

Linking CXX executable dmicesimm CMakeFiles/dmicesimm.dir/dmicesim.cc.o: In function `__static_initialization_and_destruction_0(int, int)': dmicesim.cc:(.text+0x84e): undefined reference to `TVersionCheck::TVersionCheck(int)' CMakeFiles/dmicesimm.dir/src/DMISensitiveDetector.cc.o: In function `__static_initialization_and_destruction_0(int, int)': DMISensitiveDetector.cc:(.text+0x1c2c): undefined reference to `TVersionCheck::TVersionCheck(int)' CMakeFiles/dmicesimm.dir/src/DMIEventAction.cc.o: In function `__static_initialization_and_destruction_0(int, int)': DMIEventAction.cc:(.text+0x1e82): undefined reference to `TVersionCheck::TVersionCheck(int)' CMakeFiles/dmicesimm.dir/src/DMIAnalysisManager.cc.o: In function `DMIAnalysisManager::DMIAnalysisManager(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)': DMIAnalysisManager.cc:(.text+0x8b): undefined reference to `TString::TString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' DMIAnalysisManager.cc:(.text+0xc5): undefined reference to `TFile::TFile(char const*, char const*, char const*, int)' DMIAnalysisManager.cc:(.text+0xd5): undefined reference to `TObject::operator delete(void*)' DMIAnalysisManager.cc:(.text+0xf4): undefined reference to `TString::~TString()' DMIAnalysisManager.cc:(.text+0x107): undefined reference to `TString::~TString()' CMakeFiles/dmicesimm.dir/src/DMIAnalysisManager.cc.o: In function `DMIAnalysisManager::SetupSensitiveDetectorTree(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, double, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, double> > >&)': DMIAnalysisManager.cc:(.text+0x96f): undefined reference to `TTree::TTree(char const*, char const*, int)' DMIAnalysisManager.cc:(.text+0x97f): undefined reference to `TObject::operator delete(void*)' CMakeFiles/dmicesimm.dir/src/DMIAnalysisManager.cc.o: In function `DMIAnalysisManager::SetupEventTree(std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, double, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, double> > >&)': DMIAnalysisManager.cc:(.text+0xc68): undefined reference to `TTree::TTree(char const*, char const*, int)' DMIAnalysisManager.cc:(.text+0xc78): undefined reference to `TObject::operator delete(void*)' CMakeFiles/dmicesimm.dir/src/DMIAnalysisManager.cc.o: In function `__static_initialization_and_destruction_0(int, int)': DMIAnalysisManager.cc:(.text+0x12af): undefined reference to `TVersionCheck::TVersionCheck(int)' CMakeFiles/dmicesimm.dir/src/DMIAnalysisManager.cc.o: In function `TObject::operator new(unsigned long)': DMIAnalysisManager.cc:(.text._ZN7TObjectnwEm[TObject::operator new(unsigned long)]+0x14): undefined reference to `TStorage::ObjectAlloc(unsigned long)' CMakeFiles/dmicesimm.dir/src/DMISteppingAction.cc.o: In function `__static_initialization_and_destruction_0(int, int)': DMISteppingAction.cc:(.text+0x6d9b): undefined reference to `TVersionCheck::TVersionCheck(int)' CMakeFiles/dmicesimm.dir/src/CopperRodParameterisation.cc.o: In function `__static_initialization_and_destruction_0(int, int)': CopperRodParameterisation.cc:(.text+0x28c): undefined reference to `TVersionCheck::TVersionCheck(int)' CMakeFiles/dmicesimm.dir/src/DMIPrimaryGeneratorAction.cc.o: In function `__static_initialization_and_destruction_0(int, int)': DMIPrimaryGeneratorAction.cc:(.text+0x2f4): undefined reference to `TVersionCheck::TVersionCheck(int)' CMakeFiles/dmicesimm.dir/src/DMIDetectorConstruction.cc.o: In function `DMIDetectorConstruction::ConstructDMIce()': DMIDetectorConstruction.cc:(.text+0x2e7c): undefined reference to `Form(char const*, ...)' DMIDetectorConstruction.cc:(.text+0x300b): undefined reference to `Form(char const*, ...)' DMIDetectorConstruction.cc:(.text+0x3349): undefined reference to `Form(char const*, ...)' DMIDetectorConstruction.cc:(.text+0x367b): undefined reference to `Form(char const*, ...)' DMIDetectorConstruction.cc:(.text+0x396e): undefined reference to `Form(char const*, ...)' CMakeFiles/dmicesimm.dir/src/DMIDetectorConstruction.cc.o:DMIDetectorConstruction.cc:(.text+0x3d08): more undefined references to `Form(char const*, ...)' follow CMakeFiles/dmicesimm.dir/src/DMIDetectorConstruction.cc.o: In function `__static_initialization_and_destruction_0(int, int)': DMIDetectorConstruction.cc:(.text+0xf552): undefined reference to `TVersionCheck::TVersionCheck(int)' collect2: ld returned 1 exit status make[2]: *** [dmicesimm] Error 1 make[1]: *** [CMakeFiles/dmicesimm.dir/all] Error 2 make: *** [all] Error 2

I don't understand the linking process at all, and when I try to look at the file it seems to reference, it is just gibberish(machine code?). I don't have any idea where to even start to try to solve this problem. Do you have any suggestions?

~Bethany

On Wed, 25 Jul 2012 20:52:45 GMT, Joel Long wrote:

> Hey Bethany, You will definitely need to update to the cmake build
> system properly or your simulation won't run correctly (though, as you
> have discovered, it might run). First, remove "GNUmakefile" from your
> build directory if it is there (that is part of the old build system and
> will only confuse things). Then modify cmakelists.txt (more on that in a
> moment). Then run cmake as per the instructions you found. That should
> create a file called Makefile in your build directory. In the terminal,
> navigate to that directory, then run "make".
> 
> I am attaching the text of the basic CMakeLists below. I will put things
> you will potentially need to change in [[ ]] with some comments to help
> you.
> 
> I am also going to repost this in the Installation and Configuration
> section, since it turns out that is what your issue is. Please post
> further replies there.
> 

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 More: Re: OpenGL in 4.9.5 [Continued from Visualization forum]   (Joel Long - 26 Jul, 2012)
2 More: Re: OpenGL in 4.9.5 [Continued from Visualization forum]   (Joel Long - 26 Jul, 2012)
1 None: Re: OpenGL in 4.9.5 [Continued from Visualization forum]   (Bethany - 26 Jul, 2012)
1 More: Re: OpenGL in 4.9.5 [Continued from Visualization forum]   (Joel Long - 26 Jul, 2012)
2 Note: Re: OpenGL in 4.9.5 [Continued from Visualization forum]   (Ben Morgan - 27 Jul, 2012)
 Add Message Add Message
to: "Re: OpenGL in 4.9.5 [Continued from Visualization forum]"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]