Re: Root and MSVC++

From: S.P. Wakely (sw@dirac.hep.umn.edu)
Date: Wed Sep 30 1998 - 17:39:01 MEST


I apologize for not being more explicit.

>    First of all I'd  like to know whether you succeeded with 
> test\makefile. Whether with this makefile you did build the test 
> applications and they run (That's to make sure the basic ROOT 
> environment had been installed properly)

Yes.  The test\Makefile programs all compile.

Vlazy and Tcollex crash with page faults in <unknown> at
0084:80000000 and 0084:00000009, respectively.

hworld.exe crashes 80% of the time with a page fault in ROOT_GPAD.dll at
0137:008cf2d6 

I believe the environment is set up correctly.

>   After that I would like to know whether you had a look the insight 
> of those test examples. Did you see the source of "hworld.cxx" and 
> have understood how it works and how this example can be customized 
> towards your needs.

Yes.  I can create console applications without problem.  However, I am
trying to make a dialog-based application.  There are no sample projects
included in \test which address this.

I begin by using the MFC AppWizard to create the shell of a dialog-based
application.

Now I add a button to the dialog and add a function to handle the button
click:

void CRootTestDlg::OnButton1(){
  TROOT mytest("mytest","Test of Root + MSVC");
  TCanvas *c = new TCanvas("c", "The Hello Canvas", 400, 400);
}

Use the default project flags and attempt to compile in debug mode.

It will not compile, bombing out with a series of errors in TGXW.h:

c:/root/include\TGXW.h(161) : warning C4003: not enough actual parameters for macro 'CreateWindowA'
c:/root/include\TGXW.h(161) : error C2059: syntax error : 'constant'
c:/root/include\TGXW.h(329) : warning C4003: not enough actual parameters for macro 'CreateWindowA'
c:/root/include\TGXW.h(329) : error C2275: 'Window_t' : illegal use of this type as an expression
c:/root/include\TGXW.h(329) : error C2275: 'Int_t' : illegal use of this type as an expression
c:/root/include\TGXW.h(329) : error C2275: 'Int_t' : illegal use of this type as an expression
c:/root/include\TGXW.h(329) : error C2275: 'UInt_t' : illegal use of this type as an expression
c:/root/include\TGXW.h(329) : error C2275: 'UInt_t' : illegal use of this type as an expression
c:/root/include\TGXW.h(329) : error C2275: 'UInt_t' : illegal use of this type as an expression
c:/root/include\TGXW.h(329) : error C2275: 'Int_t' : illegal use of this type as an expression
c:/root/include\TGXW.h(329) : error C2275: 'UInt_t' : illegal use of this type as an expression
c:/root/include\TGXW.h(329) : error C2062: type 'void' unexpected

I think the main question is can you use MSVC-based GUI objects
(dialogs, buttons, etc.) in the same application as you use Root-based GUI
objects (canvas, pad, etc...)?

As I said, I suspect I am missing something obvious here.

Thanks Again for any insight.
S.P. Wakely



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:38 MET