rootcint: problem episode #3

Terrence Brannon (brannon@quake.usc.edu)
13 Jun 1997 16:16:49 -0700


I am very upset but feel that I came come out on the other side of the
hill I am climbing right now. Rootcint is still failing. The
transcript below shows several failures. I removed
#pragma link C++ class paramVec from LinkDef.h as I changed the name
of the file to paramVec.h

brannon@surf ~/rs/VisionMagick/terry : cat LinkDef.h
#ifdef __CINT__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#endif
brannon@surf ~/rs/VisionMagick/terry : ls -l paramVec.h
-rw-r--r-- 1 528 dip 3645 Jun 12 15:27 paramVec.h
brannon@surf ~/rs/VisionMagick/terry : rm mydict.C
brannon@surf ~/rs/VisionMagick/terry : rootcint mydict.C -c +P -I/usr/include/g++ -I`pwd` paramVec.cc LinkDef.h
Error: source file "-I/usr/include/g++" cannot open FILE: LINE:0
brannon@surf ~/rs/VisionMagick/terry : rm mydict.C
brannon@surf ~/rs/VisionMagick/terry : rootcint mydict.C -c -I/usr/include/g++ -I`pwd` +P paramVec.cc LinkDef.h
Error: source file "-I/oscar/public/root/include" cannot open FILE: LINE:0
brannon@surf ~/rs/VisionMagick/terry : rootcint mydict.C -c +P /usr/include/g++/builtin.h -I./param.defs.h paramVec.cc LinkDef.h
Output file mydict.C already exists
brannon@surf ~/rs/VisionMagick/terry : rm mydict.C
brannon@surf ~/rs/VisionMagick/terry : rootcint mydict.C -c +P /usr/include/g++/builtin.h -I./param.defs.h paramVec.cc LinkDef.h
Error: source file "-I/oscar/public/root/include" cannot open FILE: LINE:0

brannon@surf ~/rs/VisionMagick/terry :

================================================================= paramVec.h

// This may look like C code, but it is really -*- C++ -*-
/*
Copyright (C) 1988 Free Software Foundation
written by Doug Lea (dl@rocky.oswego.edu)

This file is part of the GNU C++ Library. This library is free
software; you can redistribute it and/or modify it under the terms of
the GNU Library General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your
option) any later version. This library is distributed in the hope
that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#ifndef _paramVec_h
#ifdef __GNUG__
#pragma interface
#endif
#define _paramVec_h 1

#include <builtin.h>
#include "param.defs.h"

#ifndef _param_typedefs
#define _param_typedefs 1
typedef void (*paramProcedure)(param&);
typedef param (*paramMapper)(param&);
typedef param (*paramCombiner)(param&, param&);
typedef int (*paramPredicate)(param&);
typedef int (*paramComparator)(param&, param&);
#endif

class paramVec
{
protected:
int len;
param *s;

paramVec(int l, param* d);
public:
ClassDef(ParamVec,1);
paramVec ();
paramVec (int l);
paramVec (int l, param& fill_value);
paramVec (const paramVec&);
~paramVec ();

paramVec & operator = (const paramVec & a);
paramVec at(int from = 0, int n = -1);

int capacity() const;
void resize(int newlen);

param& operator [] (int n);
param& elem(int n);

friend paramVec concat(paramVec & a, paramVec & b);
friend paramVec map(paramMapper f, paramVec & a);
friend paramVec merge(paramVec & a, paramVec & b, paramComparator f);
friend paramVec combine(paramCombiner f, paramVec & a, paramVec & b);
friend paramVec reverse(paramVec & a);

void reverse();
void sort(paramComparator f);
void fill(param& val, int from = 0, int n = -1);

void apply(paramProcedure f);
param reduce(paramCombiner f, param& base);
int index(param& targ);

friend int operator == (paramVec& a, paramVec& b);
friend int operator != (paramVec& a, paramVec& b);

void error(const char* msg);
void range_error();
};

extern void default_paramVec_error_handler(const char*);
extern one_arg_error_handler_t paramVec_error_handler;

extern one_arg_error_handler_t
set_paramVec_error_handler(one_arg_error_handler_t f);

inline paramVec::paramVec()
{
len = 0; s = 0;
}

inline paramVec::paramVec(int l)
{
s = new param [len = l];
}

inline paramVec::paramVec(int l, param* d) :len(l), s(d) {}

inline paramVec::~paramVec()
{
delete [] s;
}

inline param& paramVec::operator [] (int n)
{
if ((unsigned)n >= (unsigned)len)
range_error();
return s[n];
}

inline param& paramVec::elem(int n)
{
return s[n];
}

inline int paramVec::capacity() const
{
return len;
}

inline int operator != (paramVec& a, paramVec& b)
{
return !(a == b);
}

#endif

-- 
Terrence Brannon * brannon@quake.usc.edu * http://quake.usc.edu/~brannon

*** This message was produced with 100% recycled electrons! ***