> - is it possible to manipulate e.g. a STL vector created in > compiled code with CINT ? Yes. > - is an explicit dictionnary generation like > #pragma link C++ class vector<Int_t>!-; > needed (as suggested on roottalk by Philippe Canal two years ago). It is still needed (for the above case). The reason being is that (with a couple of exception listed further) without generating the dictionary you will end up using at the CINT level an interpreted version of the stl container. The interpreted version is fully emulated and is quasi guaranteed to have a different layout that the compiler generated version. To make matter worse, CINT does not check per se (and maybe can not check) whether your function expect a compiled or interpreted version. At any rate, if you are using the interpreted version and try to pass it to a compiled function, it is extremely likely to fail. The exception is that you can (on some platform) have the dictionary for stl container of numerical types (int, double, float, etc) generated for you by making the cintdlls (gmake cintdlls in a ROOT distribution). > - or is the only safe and sane way to deal with STL containers to use > dynamically compiled code like It is the safer way for dealing with the situation. Cheers, Philippe -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Walter F.J. Mueller Sent: Sunday, August 25, 2002 1:25 PM To: roottalk@pcroot.cern.ch Subject: [ROOT] Status of STL support in CINT Dear all, I'm having a few problems with STL vectors and CINT and wonder whether there is somewhere a clear and precise description of what is supported and working. A search of roottalk wasn't very helpful. The page http://root.cern.ch/root/Cint.phtml?limitations states "Please understand that there are many limitations for using STL on Cint. STL is so complex that it is very difficult to document all limitations." I wonder for example - is it possible to manipulate e.g. a STL vector created in compiled code with CINT ? - is an explicit dictionnary generation like #pragma link C++ class vector<Int_t>!-; needed (as suggested on roottalk by Philippe Canal two years ago). - or is the only safe and sane way to deal with STL containers to use dynamically compiled code like .L rootest.C++ Cheers, Walter -- Walter F.J. Mueller Mail: W.F.J.Mueller@gsi.de GSI, Abteilung KP3 Phone: +49-6159-71-2766 D-64291 Darmstadt FAX: +49-6159-71-2989 WWW: http://www-kp3.gsi.de/www/kp3/people/mueller.html PGP: http://www-kp3.gsi.de/~mueller/pgp.shtml
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:08 MET