Actually, this isn't caused by scratch_all: I can now reproduce it like this as well: works: ====== G__init_cint(""); G__exec_text("Data d1;"); // works. (my "Data" class is recognized) doesn't work: ============= G__init_cint(""); G__init_cint(""); G__exec_text("Data d1;"); // error. class Data not known doesn't work: ============= G__init_cint(""); G__scratch_all(); G__init_cint(""); G__exec_text("Data d1;"); // error. class Data not known Any ideas? Thanks On Sun 2001-07-08, Christoph Bugel wrote: > (note: I use cint interpreter code, but not root) > > When I call G__scratch_all, cint seems to forget about my own classes. What I > do is this: I have my own class "Data" defined in file Data.h and Data.cxx. I > compile and link this class into my own compiled application, *and* I link > libcint into my application, *and* I also link a generated file G__cpp_data.cxx > into my application. This last file is generated by a cint commandline where I > tell it about Data.h, (I think this is called a dictionary) > > My compiled code, in general, does this: > > G__init_cint(""); > G__exec_text("Data d1;"); // works fine, cint *already* knows my class > G__scratch_all(); > G__init_cint(""); > G__exec_text("Data d1;"); // fails: class Data is not known > G__scratch_all(); > > Seems to me like cint forgot about my class "Data", when I called scratch_all. > This occured on windows, but on Linux it worked fine, so it makes me wonder > whether it is correct behaviour at all for scratch_all to forget my classes. > Maybe it is because my makefile on windows is different. Maybe I did something > wrong -- I don't exactly understand what main/G__setup.c and main/G__main.c are > for, but I used both. > > Any info is appreciated :) >
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:51 MET