Hi Ray,
The CINT internal pre-processor is not a complete C preprocessor and has a
few limitations, one of which you hit. To solve the issue use the -p
option. I.e. apply the following patch to your makefile:
diff makefile~ makefile
51c51
< $(ROOTSYS)/bin/rootcint -f $@ -c $^
---
> $(ROOTSYS)/bin/rootcint -f $@ -c -p $^
Also #define are not taken in consideration in the #pragma lines. So you
need to use the following linkdef file:
#ifdef __CINT__
#pragma link C++ class vector<double>-!;
#pragma link C++ class bug-!;
#endif
Cheers,
Philippe.
-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Ray Fliller III
Sent: Thursday, May 29, 2003 10:29 AM
To: ROOT mailing list
Subject: [ROOT] ROOT limitation....
Hello ROOTers,
I am using ROOT CVS version from Monday on LINUX.
I am trying make some streamerless and "operator>> less" dictionaries for
some external libraries. One of the classes inherits from a template
class. This template class has members that are templates that are
"#define"d to be vectors like:
#define buggyvec vector
when rootcint does to make the dictionary file I get:
Generating dictionary bugDict.cxx...
/opt/cern/root/bin/rootcint -f bugDict.cxx -c bug.h BugLinkDef.h
Limitation: can not handle macro buggyvec vector Use +P or -p option
FILE:bug.h LINE:5
Error: no such template buggyvec<double> FILE:bug.h LINE:6
Error: no such template buggyvec<double> FILE:BugLinkDef.h LINE:7
Error: link requested for unknown class buggyvec<double> FILE:BugLinkDef.h
LINE:7
Warning: Error occured during reading source files
Warning: Error occured during dictionary source generation
!!!Removing bugDict.cxx bugDict.h !!!
Error: /opt/cern/root/bin/rootcint: error loading headers...
make: *** [bugDict.cxx] Error 1
Enclosed is some code that demonstates the
error that I have.
Of course in the real case, the class that has the issues is inherited by
many others! :-(
Thanks for your help.
--
RAINMAN
"How much does a piece of gum cost Ray?"
"About $100."
"How much does a new car cost Ray?"
"`Bout $100."
"There goes working for NASA!"
==================================================================
Ray Fliller: rfliller@bnl.gov Office Phone: (631)-344-6124
C-A Accelerator Physics Dept. Fax: (631)-344-5954
Building 911B
Brookhaven National Lab
Upton, NY 11973 Office: Room 211
http://www.agsrhichome.bnl.gov/People/rfliller/
==================================================================
#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET