Root and MSVC++

From: S.P. Wakely (sw@dirac.hep.umn.edu)
Date: Tue Sep 29 1998 - 23:22:23 MEST


Hello,

I suspect I am missing something pretty obvious here...

I have a very involved Microsoft Visual C++ program to which I would
like to add some Root functionality.  In particular, I just want to 
produce and display a histogram in a window.

In a test dialog-based application, I have the following function and
includes:

-------------------
#include "TROOT.h"
#include "TCanvas.h"

void RootTest(void){

  TROOT mytest("mytest","Test of Root + MSVC");
  TCanvas *c = new TCanvas("c", "The Hello Canvas", 400, 400);

}
------------------------

This bombs on compile, giving me 45 errors and 6 warnings.  Here are the
first few:

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


What am I missing?  Can I not mix Root GUI and MSVC GUI??

Thanks,
S.P. Wakely
U of MN Physics



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