Drawing Canvas from VC++

Hi,
I am using root version 4.02 libraries and dll included at Microsoft Studio Professional .NET 2003.
I have a problem when I include the TCanvas.h classes in the program, I get the following error when the program
compiles: $ROOTSYS$\root\include\TVirtualX.h(178): error C2059: syntax error : ‘constant’. So, I can´t draw any canvas.

Can you help me to understand what happens and tell me how to solve the error?.

Thank you in advance,

Berta.

Hi Berta,
just a guess - including Windows4Root.h before any of root’s headers might solve it. MSVC redefines some identifiers used within root, which might lead to invalid c++ statements if left defined. Windows4Root.h undefines them. So try

#include “Windows4Root.h”
#include “TCanvas.h”

Axel.