RE : [ROOT] root dictionaries in .NET

From: ANCIANT E. (eric.anciant@sodern.fr)
Date: Tue Mar 30 2004 - 09:32:35 MEST


Hello John,

I Don't know if this will help you,
but in order to have rootcint dictionary fit within VC++/Microsoft DLL export scheme (with the __declspec() macro .... ) , I do things like :


#ifdef __CINT__

	class CMyClass {

#else

#ifdef MYPROJECT_EXPORTS
#define MYPROJECT_API __declspec(dllexport)
#else
#define MYPROJECT_API __declspec(dllimport)
#endif

	class MYPROJECT_API CMyClass {

#endif

... class definition ...


	ClassDef(CMyClass,0)
}



Excepts from numerous warnings, I works fine ..

Eric


> -----Message d'origine-----
> De : owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]
> De la part de Valeri Fine
> Envoyé : mardi 30 mars 2004 02:54
> À : 'Dr. John Krane'; 'Philippe Canal'
> Cc : roottalk@pcroot.cern.ch
> Objet : RE: [ROOT] root dictionaries in .NET
>
>   Hello John
>
>   I have looked up the Web site you mentioned
>
> > I'm trying to follow the instructions set out by Francois-Xavier
> > Gentit's web site <http://www.slac.stanford.edu/%7Egentit/ >.
>
> From the first glance he did miss the step to create the VC++ "export"
> library.
>
> Why he did not realize it? The problem with the "export" library is
> raised when one tries to build more then one DLL and those contain the
> cross references.
>
> For example, you want DLL to instantiate an object from another one or
> you want the main executable to create some object from DLL or something
> like this.
>
> Many simple applications do fit in a single DLL and do not require that
> step and it can be missed.
> However for the more complex one as (I suspect) is yours one may not
> miss that step.
> I have surprised myself finding another Web page:
>
> http://www.muenster.de/~naumana/rootmsvc.html
>
> doesn't explain this matter either.
>
> So the quick advice, to avoid a lengthy explanation, is to use either
> ACLiC or the
> %ROOTSYS%\test\Makefile.win32 makefile as a pattern. That Makefile is
> not quite convenient since it builds many different executables and
> DLL's at once. So you have to sort it out and disregard all rules to
> build the various executables and leave Event.DLL rules only.
>
>
> > Ack!  I have successfully built in Linux, but in VC++ I'm getting lots
>
>
> Yes this raises my suspicion; Linux (gcc) doesn't require any "export"
> library to be build.
>
> Probably Philippe's guess is not correct suggesting
> "You are missing the linking with your own dictionaries".
> In this case you may not have created executable on Linux either.
>
>
>     Hope this helps,
>
> ----
> Best regards
>                    Valeri
>
>
> > -----Original Message-----
> > From: owner-roottalk@pcroot.cern.ch
> [mailto:owner-roottalk@pcroot.cern.ch] On
> > Behalf Of Dr. John Krane
> > Sent: Monday, March 29, 2004 6:48 PM
> > To: Philippe Canal
> > Cc: roottalk@pcroot.cern.ch
> > Subject: Re: [ROOT] root dictionaries in .NET
> >
> > Hi Philippe, thanks for your response.  Now there is no spaces in the
> > TEMP environmental variable, and I have moved my source and headers to
> a
> > no-space-in-name directory.  Now I get dozens of problems like:
> >
> > TArrayQ.obj : error LNK2001: unresolved external symbol "public:
> virtual
> > void __thiscall TArrayQ::Streamer(class TBuffer &)"
> > (?Streamer@TArrayQ@@UAEXAAVTBuffer@@@Z)
> >
> > Ack!  I have successfully built in Linux, but in VC++ I'm getting lots
> > of these streamer problems.  The rest of the 34 errors are below, just
> > for fun.  It looks like I'm not including some vital library, but
> > following Francois-Xavier, I'm linking in the whole world with
> > "$(ROOTSYS)\lib\*.lib" in the additional dependencies box.
> >
> > Any ideas what I'm doing wrong?
> >
> >     - John
> >
> > --
> > TVectorQ: Building ROOT dictionary
> > TMatrixQUtils: building ROOT dictionary
> > TMatrixQ: Building ROOT dictionary
> > TArrayQ: building ROOT dictionary
> > Compiling...
> > stdafx.cpp
> > Compiling...
> > root_extend.cpp
> > TVectorQ.cpp
> > TMatrixQUtils.cpp
> > TMatrixQ.cpp
> > TArrayQ.cpp
> > Generating Code...
> > Linking...
> > TArrayQ.obj : error LNK2001: unresolved external symbol "public:
> virtual void
> > __thiscall TArrayQ::Streamer(class TBuffer &)"
> > (?Streamer@TArrayQ@@UAEXAAVTBuffer@@@Z)
> > TArrayQ.obj : error LNK2001: unresolved external symbol "public:
> virtual void
> > __thiscall TArrayQ::ShowMembers(class TMemberInspector &,char *)"
> > (?ShowMembers@TArrayQ@@UAEXAAVTMemberInspector@@PAD@Z)
> > TArrayQ.obj : error LNK2019: unresolved external symbol "public:
> static class
> > TClass * __cdecl TArrayQ::Class(void)"
> (?Class@TArrayQ@@SAPAVTClass@@XZ)
> > referenced in function "public: virtual class TClass * __thiscall
> > TArrayQ::IsA(void)const " (?IsA@TArrayQ@@UBEPAVTClass@@XZ)
> > TArrayQ.obj : error LNK2019: unresolved external symbol "class
> > ROOT::TGenericClassInfo * __cdecl ROOT::GenerateInitInstance(class
> TArrayQ const
> > *)"
> (?GenerateInitInstance@ROOT@@YAPAVTGenericClassInfo@1@PBVTArrayQ@@@Z)
> > referenced in function _$E1
> > TMatrixQ.obj : error LNK2001: unresolved external symbol "public:
> virtual void
> > __thiscall TVectorQ::Streamer(class TBuffer &)"
> > (?Streamer@TVectorQ@@UAEXAAVTBuffer@@@Z)
> > TVectorQ.obj : error LNK2001: unresolved external symbol "public:
> virtual void
> > __thiscall TVectorQ::Streamer(class TBuffer &)"
> > (?Streamer@TVectorQ@@UAEXAAVTBuffer@@@Z)
> > TMatrixQ.obj : error LNK2001: unresolved external symbol "public:
> virtual void
> > __thiscall TVectorQ::ShowMembers(class TMemberInspector &,char *)"
> > (?ShowMembers@TVectorQ@@UAEXAAVTMemberInspector@@PAD@Z)
> > TVectorQ.obj : error LNK2001: unresolved external symbol "public:
> virtual void
> > __thiscall TVectorQ::ShowMembers(class TMemberInspector &,char *)"
> > (?ShowMembers@TVectorQ@@UAEXAAVTMemberInspector@@PAD@Z)
> > TMatrixQ.obj : error LNK2019: unresolved external symbol "public:
> static class
> > TClass * __cdecl TVectorQ::Class(void)"
> (?Class@TVectorQ@@SAPAVTClass@@XZ)
> > referenced in function "public: virtual class TClass * __thiscall
> > TVectorQ::IsA(void)const " (?IsA@TVectorQ@@UBEPAVTClass@@XZ)
> > TVectorQ.obj : error LNK2001: unresolved external symbol "public:
> static class
> > TClass * __cdecl TVectorQ::Class(void)"
> (?Class@TVectorQ@@SAPAVTClass@@XZ)
> > TMatrixQ.obj : error LNK2001: unresolved external symbol "public:
> virtual void
> > __thiscall TMatrixQRow::ShowMembers(class TMemberInspector &,char *)"
> > (?ShowMembers@TMatrixQRow@@UAEXAAVTMemberInspector@@PAD@Z)
> > TMatrixQ.obj : error LNK2019: unresolved external symbol "public:
> static class
> > TClass * __cdecl TMatrixQRow::Class(void)"
> (?Class@TMatrixQRow@@SAPAVTClass@@XZ)
> > referenced in function "public: virtual class TClass * __thiscall
> > TMatrixQRow::IsA(void)const " (?IsA@TMatrixQRow@@UBEPAVTClass@@XZ)
> > TMatrixQUtils.obj : error LNK2001: unresolved external symbol "public:
> static
> > class TClass * __cdecl TMatrixQRow::Class(void)"
> > (?Class@TMatrixQRow@@SAPAVTClass@@XZ)
> > TMatrixQ.obj : error LNK2001: unresolved external symbol "public:
> virtual void
> > __thiscall TMatrixQDiag::ShowMembers(class TMemberInspector &,char *)"
> > (?ShowMembers@TMatrixQDiag@@UAEXAAVTMemberInspector@@PAD@Z)
> > TMatrixQ.obj : error LNK2019: unresolved external symbol "public:
> static class
> > TClass * __cdecl TMatrixQDiag::Class(void)"
> > (?Class@TMatrixQDiag@@SAPAVTClass@@XZ) referenced in function "public:
> virtual
> > class TClass * __thiscall TMatrixQDiag::IsA(void)const "
> > (?IsA@TMatrixQDiag@@UBEPAVTClass@@XZ)
> > TMatrixQUtils.obj : error LNK2001: unresolved external symbol "public:
> static
> > class TClass * __cdecl TMatrixQDiag::Class(void)"
> > (?Class@TMatrixQDiag@@SAPAVTClass@@XZ)
> > TMatrixQ.obj : error LNK2001: unresolved external symbol "public:
> virtual void
> > __thiscall TMatrixQ::Streamer(class TBuffer &)"
> > (?Streamer@TMatrixQ@@UAEXAAVTBuffer@@@Z)
> > TMatrixQUtils.obj : error LNK2001: unresolved external symbol "public:
> virtual
> > void __thiscall TMatrixQ::Streamer(class TBuffer &)"
> > (?Streamer@TMatrixQ@@UAEXAAVTBuffer@@@Z)
> > TMatrixQ.obj : error LNK2001: unresolved external symbol "public:
> virtual void
> > __thiscall TMatrixQ::ShowMembers(class TMemberInspector &,char *)"
> > (?ShowMembers@TMatrixQ@@UAEXAAVTMemberInspector@@PAD@Z)
> > TMatrixQUtils.obj : error LNK2001: unresolved external symbol "public:
> virtual
> > void __thiscall TMatrixQ::ShowMembers(class TMemberInspector &,char
> *)"
> > (?ShowMembers@TMatrixQ@@UAEXAAVTMemberInspector@@PAD@Z)
> > TMatrixQ.obj : error LNK2019: unresolved external symbol "public:
> static class
> > TClass * __cdecl TMatrixQ::Class(void)"
> (?Class@TMatrixQ@@SAPAVTClass@@XZ)
> > referenced in function "public: virtual class TClass * __thiscall
> > TMatrixQ::IsA(void)const " (?IsA@TMatrixQ@@UBEPAVTClass@@XZ)
> > TMatrixQUtils.obj : error LNK2001: unresolved external symbol "public:
> static
> > class TClass * __cdecl TMatrixQ::Class(void)"
> (?Class@TMatrixQ@@SAPAVTClass@@XZ)
> > TMatrixQ.obj : error LNK2019: unresolved external symbol "class
> > ROOT::TGenericClassInfo * __cdecl ROOT::GenerateInitInstance(class
> TMatrixQ
> > const *)"
> (?GenerateInitInstance@ROOT@@YAPAVTGenericClassInfo@1@PBVTMatrixQ@@@Z)
> > referenced in function _$E1
> > TMatrixQUtils.obj : error LNK2001: unresolved external symbol "public:
> virtual
> > void __thiscall TLazyMatrixQ::Streamer(class TBuffer &)"
> > (?Streamer@TLazyMatrixQ@@UAEXAAVTBuffer@@@Z)
> > TMatrixQUtils.obj : error LNK2001: unresolved external symbol "public:
> virtual
> > void __thiscall TLazyMatrixQ::ShowMembers(class TMemberInspector
> &,char *)"
> > (?ShowMembers@TLazyMatrixQ@@UAEXAAVTMemberInspector@@PAD@Z)
> > TMatrixQUtils.obj : error LNK2019: unresolved external symbol "public:
> static
> > class TClass * __cdecl TLazyMatrixQ::Class(void)"
> > (?Class@TLazyMatrixQ@@SAPAVTClass@@XZ) referenced in function "public:
> virtual
> > class TClass * __thiscall TLazyMatrixQ::IsA(void)const "
> > (?IsA@TLazyMatrixQ@@UBEPAVTClass@@XZ)
> > TMatrixQUtils.obj : error LNK2019: unresolved external symbol "public:
> static
> > class TClass * __cdecl TMatrixQColumn::Class(void)"
> > (?Class@TMatrixQColumn@@SAPAVTClass@@XZ) referenced in function
> "public: virtual
> > void __thiscall TMatrixQColumn::Streamer(class TBuffer &)"
> > (?Streamer@TMatrixQColumn@@UAEXAAVTBuffer@@@Z)
> > TMatrixQUtils.obj : error LNK2019: unresolved external symbol "public:
> static
> > class TClass * __cdecl TMatrixQFlat::Class(void)"
> > (?Class@TMatrixQFlat@@SAPAVTClass@@XZ) referenced in function "public:
> virtual
> > void __thiscall TMatrixQFlat::Streamer(class TBuffer &)"
> > (?Streamer@TMatrixQFlat@@UAEXAAVTBuffer@@@Z)
> > TMatrixQUtils.obj : error LNK2001: unresolved external symbol "public:
> virtual
> > void __thiscall THaarMatrixQ::Streamer(class TBuffer &)"
> > (?Streamer@THaarMatrixQ@@UAEXAAVTBuffer@@@Z)
> > TMatrixQUtils.obj : error LNK2001: unresolved external symbol "public:
> virtual
> > void __thiscall THaarMatrixQ::ShowMembers(class TMemberInspector
> &,char *)"
> > (?ShowMembers@THaarMatrixQ@@UAEXAAVTMemberInspector@@PAD@Z)
> > TMatrixQUtils.obj : error LNK2019: unresolved external symbol "public:
> static
> > class TClass * __cdecl THaarMatrixQ::Class(void)"
> > (?Class@THaarMatrixQ@@SAPAVTClass@@XZ) referenced in function "public:
> virtual
> > class TClass * __thiscall THaarMatrixQ::IsA(void)const "
> > (?IsA@THaarMatrixQ@@UBEPAVTClass@@XZ)
> > TMatrixQUtils.obj : error LNK2001: unresolved external symbol "public:
> virtual
> > void __thiscall THilbertMatrixQ::Streamer(class TBuffer &)"
> > (?Streamer@THilbertMatrixQ@@UAEXAAVTBuffer@@@Z)
> > TMatrixQUtils.obj : error LNK2001: unresolved external symbol "public:
> virtual
> > void __thiscall THilbertMatrixQ::ShowMembers(class TMemberInspector
> &,char *)"
> > (?ShowMembers@THilbertMatrixQ@@UAEXAAVTMemberInspector@@PAD@Z)
> > TMatrixQUtils.obj : error LNK2019: unresolved external symbol "public:
> static
> > class TClass * __cdecl THilbertMatrixQ::Class(void)"
> > (?Class@THilbertMatrixQ@@SAPAVTClass@@XZ) referenced in function
> "public:
> > virtual class TClass * __thiscall THilbertMatrixQ::IsA(void)const "
> > (?IsA@THilbertMatrixQ@@UBEPAVTClass@@XZ)
> > TMatrixQUtils.obj : error LNK2019: unresolved external symbol "class
> > ROOT::TGenericClassInfo * __cdecl ROOT::GenerateInitInstance(class
> TLazyMatrixQ
> > const *)"
> >
> (?GenerateInitInstance@ROOT@@YAPAVTGenericClassInfo@1@PBVTLazyMatrixQ@@@
> Z)
> > referenced in function _$E1
> > TMatrixQUtils.obj : error LNK2019: unresolved external symbol "class
> > ROOT::TGenericClassInfo * __cdecl ROOT::GenerateInitInstance(class
> THaarMatrixQ
> > const *)"
> >
> (?GenerateInitInstance@ROOT@@YAPAVTGenericClassInfo@1@PBVTHaarMatrixQ@@@
> Z)
> > referenced in function _$E3
> > TMatrixQUtils.obj : error LNK2019: unresolved external symbol "class
> > ROOT::TGenericClassInfo * __cdecl ROOT::GenerateInitInstance(class
> > THilbertMatrixQ const *)"
> >
> (?GenerateInitInstance@ROOT@@YAPAVTGenericClassInfo@1@PBVTHilbertMatrixQ
> @@@Z)
> > referenced in function _$E5
> > TMatrixQUtils.obj : error LNK2019: unresolved external symbol "class
> > ROOT::TGenericClassInfo * __cdecl ROOT::GenerateInitInstance(class
> TMatrixQRow
> > const *)"
> >
> (?GenerateInitInstance@ROOT@@YAPAVTGenericClassInfo@1@PBVTMatrixQRow@@@Z
> )
> > referenced in function _$E7
> > TMatrixQUtils.obj : error LNK2019: unresolved external symbol "class
> > ROOT::TGenericClassInfo * __cdecl ROOT::GenerateInitInstance(class
> > TMatrixQColumn const *)"
> >
> (?GenerateInitInstance@ROOT@@YAPAVTGenericClassInfo@1@PBVTMatrixQColumn@
> @@Z)
> > referenced in function _$E9
> > TMatrixQUtils.obj : error LNK2019: unresolved external symbol "class
> > ROOT::TGenericClassInfo * __cdecl ROOT::GenerateInitInstance(class
> TMatrixQDiag
> > const *)"
> >
> (?GenerateInitInstance@ROOT@@YAPAVTGenericClassInfo@1@PBVTMatrixQDiag@@@
> Z)
> > referenced in function _$E11
> > TMatrixQUtils.obj : error LNK2019: unresolved external symbol "class
> > ROOT::TGenericClassInfo * __cdecl ROOT::GenerateInitInstance(class
> TMatrixQFlat
> > const *)"
> >
> (?GenerateInitInstance@ROOT@@YAPAVTGenericClassInfo@1@PBVTMatrixQFlat@@@
> Z)
> > referenced in function _$E13
> > TVectorQ.obj : error LNK2019: unresolved external symbol "class
> > ROOT::TGenericClassInfo * __cdecl ROOT::GenerateInitInstance(class
> TVectorQ
> > const *)"
> (?GenerateInitInstance@ROOT@@YAPAVTGenericClassInfo@1@PBVTVectorQ@@@Z)
> > referenced in function _$E1
> > Release/root_extend.dll : fatal error LNK1120: 34 unresolved externals
> >
>


********
Ce message et eventuellement les pieces jointes sont exclusivement transmis a l'usage de leur destinataire. Leur contenu est strictement confidentiel. Si vous n etes pas le bon destinataire nous vous demandons de ne pas conserver, copier, utiliser ou divulguer cette communication. Merci de le detruire et de me notifier cette erreur.

INTERNET ne permettant pas d assurer l integrite de ce message, SODERN decline toute responsabilite au cas ou il aurait ete intercepte ou modifie.


This message and possibly attachments are transmit for the exclusive use of their address. Their content is strictly confidential. If you are not the intended recipient please do not keep, copy, use or disclose this communication to others. Also please delete it and notify the sender at once.

Because of the nature of INTERNET the sender is not in a position to ensure the integrity of this message, therefore SODERN disclaims any liability whatoever in the event of this message having been intercepted and/or altered.



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET