Dear Bertrand
Thank you for this hint. With your help I could meanwhile test my first demo program, which I attach below (myclass.zip).
I could compile it successfully:
[code]
C:\home\Rabbitus\rootcode\myclass>NMAKE /f “Makefile.win32” CFG=“Debug”
Microsoft ® Program Maintenance Utility Version 9.00.21022.08
Copyright © Microsoft Corporation. All rights reserved.
cl -D_MT -D_DLL -MDd -EHsc -nologo -GR -DWIN32 -DVISUAL_CPLUSPLUS -D_W
INDOWS -Ic:\root/include -D_CRT_SECURE_NO_DEPRECATE -Z7 -MDd -c MyClassA.cxx
MyClassA.cxx
“Generating dictionary MyClassADict.cxx…”
cl -D_MT -D_DLL -MDd -EHsc -nologo -GR -DWIN32 -DVISUAL_CPLUSPLUS -D_W
INDOWS -Ic:\root/include -D_CRT_SECURE_NO_DEPRECATE -Z7 -MDd -c MyClassADict.cxx
MyClassADict.cxx
link /INCREMENTAL:NO /NOLOGO -entry:_DllMainCRTStartup@12 -dll -debug
/INCREMENTAL:NO /NOLOGO -subsystem:console,5.0 -nologo -include:G__cpp_setupG_
Hist -include:_G__cpp_setupG__Graf1 -include:G__cpp_setupG__G3D -include:G
cpp_setupG__GPad -include:_G__cpp_setupG__Tree -include:_G__cpp_setupG__Rint -i
nclude:_G__cpp_setupG__PostScript -include:G__cpp_setupG__Matrix -include:G
cpp_setupG__Physics MyClassA.obj MyClassADict.obj c:\root/lib/libCore.lib c:\ro
ot/lib/libCint.lib c:\root/lib/libHist.lib c:\root/lib/libGraf.lib c:\root/lib/
libGraf3d.lib c:\root/lib/libGpad.lib c:\root/lib/libTree.lib c:\root/lib/libR
int.lib c:\root/lib/libPostscript.lib c:\root/lib/libMatrix.lib c:\root/lib/lib
Physics.lib c:\root/lib/libNet.lib c:\root/lib/libRIO.lib c:\root/lib/libGui.li
b c:\root/lib/libGraf.lib c:\root/lib/libGpad.lib -out:libMyClassA.dll
Creating library libMyClassA.lib and object libMyClassA.exp
mt -nologo -manifest libMyClassA.dll.manifest -outputresource:libMyClass
A.dll;2[/code]
and run it with root CINT.
However, when I try to compile it with ACLiC I get the following error:
[code]
root [0] gSystem->Load(“libMyClassA.dll”)
(int)0
root [1] .L macroMyClassA.C+
Info in TWinNTSystem::ACLiC: creating shared library C:\home\Rabbitus\rootcode
\myclass\macroMyClassA_C.dll
23444109_cint.cxx
cl : Command line warning D9002 : ignoring unknown option ‘-G5’
se4_.cxx
Creating library C:\home\Rabbitus\rootcode\myclass\macroMyClassA_C.lib and ob
ject C:\home\Rabbitus\rootcode\myclass\macroMyClassA_C.exp
se4_.obj : error LNK2019: unresolved external symbol "public: __thiscall MyClass
A::MyClassA(void)" (??0MyClassA@@QAE@XZ) referenced in function "void __cdecl Te
st(void)" (?Test@@YAXXZ)
C:\home\Rabbitus\rootcode\myclass\macroMyClassA_C.dll : fatal error LNK1120: 1 u
nresolved externals
Error in : Compilation failed![/code]
Is seems that ACLiC does not understand what a class is.
Do I have to add something?
BTW, is it possible to load the source code into VC++ and compile it from there?
Do I need special settings for VC++ to recognize root classes?
Best regards
Christian
myclass.zip (6.06 KB)