Hi Troy, We did quite a bit of work in this area. The result of this work is in ROOT 4.00/02. Could you please try to upgrade and let me know if your still have problem? Note that in 4.00/02 the std::string dictionary has move from the cintdlls to the libCore.dll. Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Troy D. Straszheim Sent: Monday, March 01, 2004 2:07 AM To: roottalk@pcroot.cern.ch Subject: Re: [ROOT] cout << string ? (cintdlls/string.so build failure) Hey Philippe, "Philippe Canal" <pcanal@fnal.gov> writes: > Hi Troy, > > This problem has been fixed in ROOT 4.00/02. > > For 3.10/02 you can use: > root [0] #include <string> > root [1] string s = "foo"; > root [2] cout << s.c_str(); > > > I have verified that this works on another machine here, but for some > > reason it is not working on mine. I'm wondering if somebody can give me a It also works fine under root 3.10.02 as well, of course, it was just failing on my particular machine. The "cout" was just an example that something about strings appeared to be screwy. The real problems were in passing strings to functions and getting automatic type conversion from C string literals ("these") to string types, as in: void takesastring(const string &); takesastring("foo"); which were failing as well. So the c_str() workaround worked, but that wasn't the point. I should have been clearer. But anyway I found the problem. As it turns out, on my machine, string.so in "cintdlls" fails to build, but the error is ignored and the compile keeps going, ending up in a faulty installation of root. Installing the binary distribution fixes these problems. I'm fine using the binary distribution, and I would find the string::iterator problem myself (no time right now), but in case anybody wants to chase down this error, I'll include it. I got this error with root 3.10.01 and 3.10.02, using gcc v.3.3.2 and v.3.2.3. Glibc version 2.3.2. (Yep, I did quite a lot of compiling, and every time the error flew by without my seeing it.) Cheers, Troy 8% make cintdlls g++ -shared -Wl,-soname,stdfunc.so -O -o cint/include/stdfunc.so cint/lib/stdstrct/G__c_stdfunc.o ==> cint/include/stdfunc.so done Note: Link requested for undefined class __dirstream (ignore this message) FILE: LINE:0 cint/lib/posix/G__c_posix.c: In function `G__posix__0_21': cint/lib/posix/G__c_posix.c:172: warning: passing arg 1 of `putenv' discards qualifiers from pointer target type g++ -shared -Wl,-soname,posix.so -O -o cint/include/posix.so cint/lib/posix/G__c_posix.o cint/lib/posix/exten.o ==> cint/include/posix.so done Note: Link requested for undefined class ipc_parm (ignore this message) FILE: LINE:0 Note: Link requested for undefined class ipc_perm (ignore this message) FILE: LINE:0 Note: Link requested for undefined class semid_ds (ignore this message) FILE: LINE:0 Note: Link requested for undefined class msqid_ds (ignore this message) FILE: LINE:0 g++ -shared -Wl,-soname,ipc.so -O -o cint/include/sys/ipc.so cint/lib/ipc/G__c_ipc.o ==> cint/include/sys/ipc.so done Error: link requested for unknown typedef string::iterator FILE:cint/lib/dll_stl/str.h LINE:26 !!!Removing cint/lib/dll_stl/G__cpp_string.cxx cint/lib/dll_stl/G__cpp_string.h !!! g++: cint/lib/dll_stl/G__cpp_string.cxx: No such file or directory g++: no input files g++ -shared -Wl,-soname,string.so -O -o cint/stl/string.so cint/lib/dll_stl/G__cpp_string.o g++: cint/lib/dll_stl/G__cpp_string.o: No such file or directory mv: cannot stat `cint/stl/string.so': No such file or directory make: *** [cintdlls] Interrupt
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET