Dear Rooters, I have a question concerning the right format of the LinkDef.h file. My class contains: class TEyeEventHeader : public TObject { public: static const UInt_t kTicksPerSecond = 100000000; // ... more stuff ClassDef(TEyeEventHeader,(int)EyeEVENTVERSIONv1) }; In the generated Dictionary file (EyeEventDict.cc) I found: G__memvar_setup((void*)(&TEyeEventHeader::kTicksPerSecond),104,0,1,-1,G__defined_typename("UInt_t"),-2,1,"kTicksPerSecond=",0,(char*)NULL); which finally results in an unresolved reference: libEyeEvent.so.1: undefined reference to `TEyeEventHeader::kTicksPerSecond' collect2: ld returned 1 exit status when I am trying to link the shared lib with an application. The same is also true for a statically created library. I tried in the LinkDef.h file with: #pragma link C++ class TEyeEventHeader; #pragma link C++ global TEyeEventHeader::kTicksPerSecond; with the result: Note: link requested for unknown global variable TEyeEventHeader::kTicksPerSecond FILE:EventLinkDef.h LINE:22 but without any other positive success. Probably I need some other statement there ? Do you have any idea what I can do ? (Using 3.02/07 with gcc 2.95.2) Thanks Hermann-Josef ************************************************************************** * * * Dr. Hermann-Josef Mathes * * KASCADE & AUGER Collaboration * * Forschungszentrum Karlsruhe Phone: +49 7247 822429 * * Institut fuer Kernphysik FAX: +49 7247 824075 * * POB 3640 * * D-76021 Karlsruhe/Germany Mail: mathes@ik.fzk.de * * hjmathes@web.de * * * * Feel free to visit my homepage: * * http://www-ik3.fzk.de/~mathes/Welcome.html * **************************************************************************
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:40 MET