// test.H
#include <string>
namespace test {
extern string const abc;
extern char const * const default_str;
}
// testLinkDef.h
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ namespace test;
#pragma link C++ nestedclass;
#pragma link C++ nestedtypedef;
#endif
---------------------------------------------
(1) rootcint testDict.C -c -p test.H testLinkDef.h
this step is ok.
(2) g++ -O -fPIC -I/home/hp/ROOT/include -I./ -c -o testDict.o testDict.C
testDict.C: In function `void G__setup_memvartest()':
testDict.C:155: `p' undeclared (first use this function)
testDict.C:155: (Each undeclared identifier is reported only once
testDict.C:155: for each function it appears in.)
testDict.C:156: `constdefault_str' undeclared in namespace `test'
-----------------------------------------------------------
cint version: 5.15.76
Sun Solaris 9;
gcc 2.95.2
-----------------------------------------------------
If I change test.H to the following:
namespace test {
extern string abc;
extern char const * default_str;
}
then
default_str will be ok.
But
abc will still have the same 'p' undeclared message.
please help,
thanks,
HP
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET