Hi everyone,
Some of you might remember I had some trouble updating Root v4 to Root v5 some time ago. I had the poor judgement to copy my root binaries and libraries directly into /bin and /lib, and created an /include directory, which caused a world of trouble when it came time to update. (Since I had also defined $ROOTSYS and added it to associated PATHs, I really don't know what I was thinking copying over all those files.)
Anyway, I recently tried to update to v5 again and thought I was
successful. I removed all the root files from /bin and /lib, removed
/include, updated all my environmental variables, and was able to
compile libraries that depend on Root, and also when I run Root the
splash page says Root v5.14/00b, as does the welcome message in the
terminal window. (In my earlier attemps, there was an obvious mismatch
between the splash screen and the welcome message, showing me I was
getting a mix of library versions.) I am able to use ACLiC to compile
*most* code I want from within Root, but I am getting a strange failure
today. I can only assume it is another v4 legacy on my end, but maybe not.
As you can see below, I'm getting a failure trying to ".L kRow.cpp+", complaining about my vector::iterator declaration, yet no problem reported by the compiler in the subsequent validity test. With the debug mode set to 5, I see "did not find plugin for class TSystem..." messages, but nothing more enlightening (to me). Does anybody know what my problem might be? I have looked at the ACLiC web page and found many cautions about using STL, but what I'm doing seems simple and worked in v4.
Here is my Root session, followed by the code in question:
FreeType Engine v2.1.9 used to render TrueType fonts. Compiled on 26 January 2007 for linux with thread support.
CINT/ROOT C/C++ Interpreter version 5.16.16, November 24, 2006
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] gDebug =5;
root [1] .L kRow.cpp+
Info in <TPluginManager::FindHandler>: did not find plugin for class
TSystem and uri /data/kranelib/util/.
Info in <TPluginManager::FindHandler>: did not find plugin for class
TSystem and uri /data/kranelib/util/./kRow_cpp.so
Info in <TUnixSystem::ACLiC>: creating shared library
/data/kranelib/util/./kRow_cpp.so
Info in <TPluginManager::FindHandler>: did not find plugin for class
TSystem and uri
/data/z_packages_and_software/rpm_by_hand/root/current/etc/system.rootmap
Info in <ACLiC>: creating the dictionary files
Info in <ACLiC>: rootcint
--lib-list-prefix=/data/kranelib/util/./fileqDTxjTmap -f
/data/kranelib/util/./fileaWohGY.cxx -c -p -I$ROOTSYS/include
-I"/data/z_packages_and_software/rpm_by_hand/root/current/include"
/data/kranelib/util/./kRow.cpp /data/kranelib/util/./file5yQHZVlinkdef.h
Error: Symbol iteratorfield0 is not defined in current scope kRow.h:14:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
!!!Removing /data/kranelib/util/./fileaWohGY.cxx
/data/kranelib/util/./fileaWohGY.h !!!
Error: rootcint: error loading headers...
Error in <ACLiC>: Dictionary generation failed!
Info in <ACLiC>: Invoking compiler to check macro's validity
Info in <ACLiC>: g++ -c -O -pipe -Wall -W -Woverloaded-virtual -fPIC
-Iinclude -pthread -I$ROOTSYS/include -I"/data/z_packages_and_software/rpm_by_hand/root/current/include" -I/data/kranelib/util/. -I/data/kranelib/util
Probably your macro uses something rootcint can't parse. Check http://root.cern.ch/root/Cint.phtml?limitations for Cint'slimitations.
Here is the simple class that I was trying to compile, which worked under Root v4:
kRow.h -----------------------------------------------#ifndef kRow_H
#include <vector>
#include "TString.h"
using std::vector;
class kRow {
private:
vector<TString>::iterator field0;
public:
kRow(vector<TString>::iterator p) {field0=p;}
~kRow() { }
void Close(Option_t *option=""){ option=0; } ULong_t GetFieldLength(Int_t field){ field=0; return 0; } // notimplemented
const char *GetField(Int_t field);
const char *operator[](Int_t field) { return GetField(field); }
};
#endif
kRow.cpp -----------------------------------------------#include "kRow.h"
const char *kRow::GetField(Int_t field){
return *(field0+field);
}
Received on Fri Jan 26 2007 - 21:14:13 CET
This archive was generated by hypermail 2.2.0 : Fri Jan 26 2007 - 23:50:00 CET