Hi Colin,
In your include file MyClass.h, you use the macro ClassDef. You must include
something like #include "Rtypes.". With the following MyClass.h,
your small test compiles correctly.
#include "Rtypes.h"
#include <vector>
class MyClass {
public:
MyClass(vector<float> vect) {}
ClassDef(MyClass,0)
};
Rene Brun
Colin Bernet wrote:
>
> Hi rooters,
>
> Maybe another problem with cint and the standard library : I would like to
> have a member function which takes a vector<float> as an
> argument.
>
> When I do that, I get the following error message when compiling the
> dictionnary :
>
> g++ -D_REENTRANT
> -I/afs/cern.ch/na49/library.4/ROOT/new/i386_redhat60/root/include -c
> Test.cc
> /afs/cern.ch/na49/library.4/ROOT/new/i386_redhat60/root/bin/rootcint -f
> Dict.cc -c -D_REENTRANT
> -I/afs/cern.ch/na49/library.4/ROOT/new/i386_redhat60/root/include
> MyClass.h LinkDef.h
> class MyClass in MyClass.h line 3 original base of virtual func
> g++ -D_REENTRANT
> -I/afs/cern.ch/na49/library.4/ROOT/new/i386_redhat60/root/include -c
> Dict.cc
> Dict.cc: In function `int G__MyClass_MyClass_0_0(struct G__value *, const
> char *, struct G__param *, int)':
> Dict.cc:113: no matching function for call to `MyClass::MyClass
> (vector<float,__malloc_alloc_template<0> > &)'
> MyClass.h:9: candidates are: MyClass::MyClass(const MyClass &)
> MyClass.h:6:
> MyClass::MyClass(vector<float,__default_alloc_template<true,0> >)
>
> I attached a small test program if you want to have a look.
>
> cheers,
>
> Colin
>
> Colin Bernet
> Tel. +49-6131/39-23192
> Fax +49-6131/39-22964
>
> --------------------------------------------------------------------------------
>
> Name: Test.tar
> Test.tar Type: Unix Tape Archive (application/x-tar)
> Encoding: BASE64
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:47 MET