Hello Gilles,
When you have ROOT related question, I recommend to send message to
roottalk@root.cern.ch. There are many people who can answer this
kind of question. I can answer pure-CINT questins, but not always answer
ROOT related ones.
Rooters,
Will you help him?
Thank you
Masaharu Goto
>
>From zala@sunstar6.leeds.ac.uk Sun Apr 2 22:46:34 JST 2000
>Message-Id: <200004021340.OAA18989@sunstar6.leeds.ac.uk>
>Date: Sun, 2 Apr 2000 14:40:31 +0100 (BST)
>From: Gilles Zalamansky <zala@ast.leeds.ac.uk>
>Reply-To: Gilles Zalamansky <zala@ast.leeds.ac.uk>
>Subject: adding classe to root and Cint error messages
>To: gotom@jpn.hp.com
>MIME-Version: 1.0
>Content-Type: TEXT/plain; charset=us-ascii
>Content-MD5: B7ugERIfnHXhumE0XvGACQ==
>X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.3.5 SunOS 5.7 sun4u sparc
>Content-Length: 3974
>Status: RO
>
>Dear Dr Goto,
>
>I want to add a new classe to my root programs. Let's call it Even2
>
>It is declared in file Even2.h
>
>
>#ifndef EVEN2_H
>#define EVEN2_H
>
>
>class Even2:public TObject
>{
>private:
>
>public:
>Even2(){};
>~Even2(){};
>ClassDef(Even2,1)
>};
>
>#endif
>
>Mu LinkDef.h is:
>
>#ifdef __CINT__
>
>#pragma link off all globals;
>#pragma link off all classes;
>#pragma link off all functions;
>
>#pragma link C++ class Part;
>#pragma link C++ class ShowerHeader;
>#pragma link C++ class Event;
>#pragma link C++ class Even2;
>
>#endif
>
>and my Makefile starts with
>
>ObjSuf = o
>SrcSuf = cxx
>ExeSuf =
>DllSuf = so
>EVENTLIB = $(EVENTO)
>OutPutOpt = -o
>
>ROOTCFLAGS = $(shell root-config --cflags)
>ROOTLIBS = $(shell root-config --libs)
>ROOTGLIBS = $(shell root-config --glibs)
>
># Linux with egcs
>CXX = g++
>CXXFLAGS = -O -Wall -fPIC
>LD = g++
>LDFLAGS = -g
>SOFLAGS = -shared
>
>
>CXXFLAGS += $(ROOTCFLAGS)
>LIBS = $(ROOTLIBS)
>GLIBS = $(ROOTGLIBS)
>
>PROGRAMS = corsika_qgsjet_thin test0 test3 test4 test5
>
>all: $(PROGRAMS)
>clean:
> rm -f $(PROGRAMS) *.o corsairesDict.cc
>
>corsairesDict.cc: Even2.h Event.h LinkDef.h
> $(ROOTSYS)/bin/rootcint -f $@ -c $^
>corsairesDict.o: corsairesDict.cc
> $(CXX) -c $< $(CXXFLAGS)
>
>
>and when executing it, I have the error message:
> make
>/usr/local/root/pro/root/bin/rootcint -f corsairesDict.cc -c Even2.h Event.h
LinkDef.h
>Note: operator new() masked 1c
>Note: operator delete() masked 1c
>g++ -c corsairesDict.cc -O -Wall -fPIC -I/usr/local/root/pro/root/include
>g77 corsika_qgsjet_thin.o gheisha.o qgsjet99_risse99.o cintwrite.o timer.o
gccwrite.o corsairesDict.o generalfunc.o corsikafunc.o Part.o
>Event.o /usr/local/lib/libstdc++.a -L/usr/local/root/pro/root/lib -lNew -lBas
e -lCint -lClib -lCont -lFunc -lGraf -lGraf3d -lHist -lHtml
>-lMatrix -lMeta -lMinuit -lNet -lPhysics -lPostscript -lProof -lRint -lTree
-lUnix -lZip -lm -ldl -rdynamic -L/usr/local/root/pro/root/lib
>-lNew -lBase -lCint -lClib -lCont -lFunc -lGraf -lGraf3d -lHist -lHtml
-lMatrix -lMeta -lMinuit -lNet -lPhysics -lPostscript -lProof -lRint
>-lTree -lUnix -lZip -lGpad -lGui -lGX11 -lX3d -L/usr/X11R6/lib -lXpm -lX11 -l
m -ldl -rdynamic -o corsika_qgsjet_thin
>corsairesDict.o: In function `operator>>(TBuffer &, Even2 *&)':
>corsairesDict.o(.text+0x1c): undefined reference to `Even2::Class(void)'
>corsairesDict.o: In function `Even2::Streamer(TBuffer &)':
>corsairesDict.o(.text+0x117): undefined reference to `Even2::Class(void)'
>corsairesDict.o: In function `Even2::ShowMembers(TMemberInspector &, char *)'
:
>corsairesDict.o(.text+0x14d): undefined reference to `Even2::Class(void)'
>corsairesDict.o: In function
`G__Even2_ImplFileName_4_0__FP8G__valuePcP8G__parami':
>corsairesDict.o(.text+0x1c20): undefined reference to
`Even2::ImplFileName(void)'
>corsairesDict.o: In function
`G__Even2_ImplFileLine_5_0__FP8G__valuePcP8G__parami':
>corsairesDict.o(.text+0x1c54): undefined reference to
`Even2::ImplFileLine(void)'
>corsairesDict.o: In function `G__Even2_Class_7_0__FP8G__valuePcP8G__parami':
>corsairesDict.o(.text+0x1cb4): undefined reference to `Even2::Class(void)'
>corsairesDict.o: In function
`G__Even2_Dictionary_1_1__FP8G__valuePcP8G__parami':
>corsairesDict.o(.text+0x1ded): undefined reference to `Even2::Dictionary(void
)
'
>corsairesDict.o: In function `Even2::IsA(void) const':
>corsairesDict.o(.text+0x6760): undefined reference to `Even2::Class(void)'
>collect2: ld returned 1 exit status
>make: *** [corsika_qgsjet_thin] Error 1
>
>
>Can you tell me please what I typed wrong in my Even2.h ?
>
>Also, I had problems with pointers to members functions. Mr Brun told me that
he forwarded
>you my mai. I don't know how serious the problem is, but I have to write a
short report next
>week about what we intend to do with root at Leeds univ.
>Can you just tell me quicly if it is possible to define pointers to members
functions with
>cint?
>
>Best regards
>
>Gilles Zalamansky
>
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:22 MET