Hi Feng,
you can use std::string in a macro. Just call #include <string> in your
rootlogon.C (or first line of your session). However, if you are working with
a set of compiled classes using std::string as method arguments and want to call
these methods via a macro then you have to use a compiled version of the string
class. This compiled version is not (yet) by default provided in the ROOT
distribution. To get the compiled version of the string class do:
- get cint5.14.tar.gz from ftp://root.cern.ch/root.
- mkdir cint
- cd cint
- export CINTSYSDIR=~/cint
- tar zxvf ../cint5.14.tar.gz (make sure you are in directory cint
otherwise your current dir gets cluttered up with the cint source)
- install cint: sh setup platform/linux2.0 (assuming you run on linux)
- create stl precompiled libs:
cd $CINTSYSDIR/lib/dll_stl
sh setup
- this will create $CINTSYSDIR/stl/string.dll and other .dll's
- copy string.dll (and other dll's) to $ROOTSYS/cint/stl
Cheers, Fons.
Feng Xiong wrote:
>
> Hello,
>
> Can anybody tell me whether I can use a string class in a macro, or should
> I convert the macro into an application and then compile it? Thanks!
>
> Feng
--
Org: CERN, European Laboratory for Particle Physics.
Mail: 1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248
WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7677910
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:19 MET