Hello,
I’m fairly new to ROOT and encoutered a problem when trying to compile a custom event class in Windows:
The event class contains std::vector objects of custom kind, which – as I understood – cannot be accessed by CINT directly. Therefore, I added functions into the event class which return just the ADC value out of the vector structure. Under linux it compiles all well into a library, which I can load into ROOT and work with the data. However, I also need it to work under Windows. Using Visual Studio 2008, I tried to compile and link. However, I get the following linker error:
1>ECAL_Bar.obj : error LNK2001: unresolved external symbol ""public: virtual void __thiscall ECAL_Bar::Streamer(class TBuffer &)" (?Streamer@ECAL_Bar@@UAEXAAVTBuffer@@@Z)".
1>ECAL_Bar.obj : error LNK2001: unresolved external symbol ""public: virtual void __thiscall ECAL_Bar::ShowMembers(class TMemberInspector &)" (?ShowMembers@ECAL_Bar@@UAEXAAVTMemberInspector@@@Z)".
1>ECAL_Bar.obj : error LNK2001: unresolved external symbol ""public: static class TClass * __cdecl ECAL_Bar::Class(void)" (?Class@ECAL_Bar@@SAPAVTClass@@XZ)".
1>ECAL_Bar.obj : error LNK2001: unresolved external symbol ""class ROOT::TGenericClassInfo * __cdecl ROOT::GenerateInitInstance(class ECAL_Bar const *)" (?GenerateInitInstance@ROOT@@YAPAVTGenericClassInfo@1@PBVECAL_Bar@@@Z)".
1>ECAL_Layer.obj : error LNK2001: unresolved external symbol ""public: virtual void __thiscall ECAL_Layer::Streamer(class TBuffer &)" (?Streamer@ECAL_Layer@@UAEXAAVTBuffer@@@Z)".
1>ECAL_Layer.obj : error LNK2001: unresolved external symbol ""public: virtual void __thiscall ECAL_Layer::ShowMembers(class TMemberInspector &)" (?ShowMembers@ECAL_Layer@@UAEXAAVTMemberInspector@@@Z)".
1>ECAL_Layer.obj : error LNK2001: unresolved external symbol ""public: static class TClass * __cdecl ECAL_Layer::Class(void)" (?Class@ECAL_Layer@@SAPAVTClass@@XZ)".
1>ECAL_Layer.obj : error LNK2001: unresolved external symbol ""class ROOT::TGenericClassInfo * __cdecl ROOT::GenerateInitInstance(class ECAL_Layer const *)" (?GenerateInitInstance@ROOT@@YAPAVTGenericClassInfo@1@PBVECAL_Layer@@@Z)".
As I understood from other posts, this might be a problem of not linking the dictionary correctly. However, the EventDict.cxx generated by rootcint compiles well and is included in the linking command. I have no clue whatsoever how to solve this problem and would much appreciate your help.
Thanks,
Jannis
ECAL_Bar.cpp (353 Bytes)
ECAL_Bar.h (414 Bytes)
ECAL_Layer.cpp (486 Bytes)
ECAL_Layer.h (428 Bytes)
Event.cpp (1.19 KB)
Event.h (621 Bytes)