Gabriel,
I have no problems generating or compiling your dictionary under Windows.
I do:
rootcint -f MyMainFrameCint.cxx -c MyMainFrame.h MyMainFrameLinkDef.h
cl -O2 -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo -DVISUAL_CPLUSPLUS \
-D_X86_=1 -D_DLL -MD -I'C:\cygwin\home\brun\root\include' \
-c MyMainFrameCint.cxx
Note that in interactive ROOT, you can also directly
root > .L MyMainFrame.cxx+
This will automatically generate a dictionary, comnpile it as well as
myMainFrame.cxx, make a dll and load it in memory ready to execute.
I cannot test your file with the old compiler VC++6, only with VC++7.0 or 7.1
Rene Brun
Gabriel Tabacaru wrote:
>
> Hi all,
>
> I have here an example of Root GUI application that is very similar to the
> one from http://root.cern.ch/root/hepvis98/newgui.html . It works
> perfectly with ROOT 4.00/03 on a Linux box.
>
> Now I'd like to make it work under
> WindowsXP/NT/w2000 with VC++ 6, version 4.00/08 (good old tar file) **WIN32GDK**
> but I can not.
> I have no errors when I run
> rootcint -f MyMainFrameCint.cxx -c MyMainFrame.cxx LinkDef.h
> I have warnings when I build .dll library under VC++6 projects:
> ======================== see continuation of the message =====
> Compiling...
> MyMainFrameCint.cxx
> c:\root400\root\include\tgframe.h(322) : warning C4800: 'int' : forcing
> value to bool 'true' or 'false' (performance warning)
> c:\root400\root\include\tbuffer.h(306) : warning C4541: 'typeid' used on
> polymorphic type 'class TGTextButton' with /GR-; unpredictable behavior
> may result
> c:\gabriel\test\t1_cint\mymainframecint.cxx(118) : see reference
> to function template instantiation 'class TBuffer &__cdecl operator
> <<(class TBuffer &,const class TGTextButton *)' being compiled
> c:\root400\root\include\tbuffer.h(306) : warning C4541: 'typeid' used on
> polymorphic type 'class TGCheckButton' with /GR-; unpredictable behavior
> may result
> c:\gabriel\test\t1_cint\mymainframecint.cxx(120) : see reference
> to function template instantiation 'class TBuffer &__cdecl operator
> <<(class TBuffer &,const class TGCheckButton *)' being compiled
> c:\root400\root\include\tbuffer.h(306) : warning C4541: 'typeid' used on
> polymorphic type 'class TGRadioButton' with /GR-; unpredictable behavior
> may result
> c:\gabriel\test\t1_cint\mymainframecint.cxx(121) : see reference
> to function template instantiation 'class TBuffer &__cdecl operator
> <<(class TBuffer &,const class TGRadioButton *)' being compiled
> c:\root400\root\include\tbuffer.h(306) : warning C4541: 'typeid' used on
> polymorphic type 'class TGLayoutHints' with /GR-; unpredictable behavior
> may result
> c:\gabriel\test\t1_cint\mymainframecint.cxx(123) : see reference
> to function template instantiation 'class TBuffer &__cdecl operator
> <<(class TBuffer &,const class TGLayoutHints *)' being compiled
> c:\root400\root\include\tbuffer.h(306) : warning C4541: 'typeid' used on
> polymorphic type 'class TGFileDialog' with /GR-; unpredictable behavior
> may result
> c:\gabriel\test\t1_cint\mymainframecint.cxx(124) : see reference
> to function template instantiation 'class TBuffer &__cdecl operator
> <<(class TBuffer &,const class TGFileDialog *)' being compiled
> c:\root400\root\include\tbuffer.h(306) : warning C4541: 'typeid' used on
> polymorphic type 'class TGWindow' with /GR-; unpredictable behavior may
> result
> c:\gabriel\test\t1_cint\mymainframecint.cxx(127) : see reference
> to function template instantiation 'class TBuffer &__cdecl operator
> <<(class TBuffer &,const class TGWindow *)' being compiled
> warning C4786:
> 'G__MyMainFrameCintLN_iteratorlErandom_access_iterator_tagcOiterator_traitslEvectorlETStreamerInfocOallocatorlETStreamerInfomUgRsPgRcLcLiteratorgRcLcLvalue_typecOiterator_traitslEvectorlETStreamerInfocOallocatorlETStreamerInfomUgRsPgR
> cLcLiteratorgRcLcLdifference_typecOiterator_traitslEvectorlETStreamerInfocOallocatorlETStreamerInfomUgRsPgRcLcLiteratorgRcLcLpointercOiterator_traitslEvectorlETStreamerInfocOallocatorlETStreamerInfomUgRsPgRcLcLiteratorgRcLcLreferencegR'
> : identifier
> was truncated to '255' characters in the debug information
> warning C4786:
> 'G__MyMainFrameCintLN_iteratorlErandom_access_iterator_tagcOvectorlETStreamerInfocOallocatorlETStreamerInfomUgRsPgRcLcLiteratorcOlongcOvectorlETStreamerInfocOallocatorlETStreamerInfomUgRsPgRcLcLiteratormUcOvectorlETStreamerInfocOalloc
> atorlETStreamerInfomUgRsPgRcLcLiteratoraNgR' : identifier was truncated to
> '255' characters in the debug information
> Linking...
>
> t1_gui.dll - 0 error(s), 9 warning(s)
> ============================================================
> Under root I have:
>
> root [0] gSystem->Load("t1_gui.dll");
> root [1] MyMainFrame *fr
> root [2] fr = new MyMainFrame(gClient->GetRoot(),200,200)
> (class MyMainFrame*)0x1913ae8
>
> I have an empty frame without any buttons but I have also a
> ROOT crash with an XP error message window:
> "This application has requested the Runtime to terminate..."
>
> Do you have any ideea how to make it work ?
> Thanks,
> Gabriel
>
> --
> ===============================================
> Dr. Gabriel Tabacaru =
> Cyclotron Institute - Texas A&M University =
> Univ. Drive =
> MS 3366, College Station, Texas 77843-3366 =
> USA =
> Tel. : ++ 979 845 1411 =
> e-mail: tabacaru@comp.tamu.edu =
> tabacaru@tamu.edu =
> ===============================================
>
> --------------------------------------------------------------------------------
> Name: MyMainFrame.cxx
> MyMainFrame.cxx Type: Plain Text (TEXT/PLAIN)
> Encoding: BASE64
>
> Name: MyMainFrame.h
> MyMainFrame.h Type: Plain Text (TEXT/PLAIN)
> Encoding: BASE64
>
> Name: LinkDef.h
> LinkDef.h Type: Plain Text (TEXT/PLAIN)
> Encoding: BASE64
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET