Re: Root and MSVC++

Valery Fine (fine@bnl.gov)
Wed, 30 Sep 1998 10:40:55 -0500


On 29 Sep 98 at 23:30, S.P. Wakely wrote:

>
>
> > To answer your question I'd like to see the compilation flags and
> > macros you supplied.
> > Did you use those from the %rootsys%/test/makefile ?
>
> I am using largely the default options for a dialog-based
> application. There seems to be no missing options which could
> account for these errors, but what do I know?
>
> These are the project flags I am using:
>
> /nologo /MDd /W3 /Gm /GX /Zi /Od /I "c:\root\include" /D "WIN32" /D
> "_DEBUG" /D "_WINDOWS" /D "_AFXDLL"
>
>
> PS.. I am using VC++ 5.0 in Windows 95.

I am sorry but you are keeping send me the small pieces of
information. From those I can not figure out what is going wrong
on your side.

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)

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.

Did you pay attention those examples are "WIN32 console
applications" ?

I took your example into mfc.cxx file ("as is" I did no change as
you can see below)

#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);

}

and compiled it with no "Warning" as follows:

E:\users\root\expert>cl /c /I%ROOTSYS%\src /DWIN32 /MD mfc.cxx
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 11.00.7022 for
80x86 Copyright (C) Microsoft Corp 1984-1997. All rights reserved.

mfc.cxx

E:\users\root\expert>dir mfc.*
Volume in drive E is Users' partition
Volume Serial Number is 6C47-FD95

Directory of E:\users\root\expert

30.09.98 10:31 186 mfc.cxx
30.09.98 10:31 1'015 mfc.obj
2 File(s) 1'201 bytes

Then I applied EXACTLY all flags from your message and found no
problem too:

E:\users\root\expert>cl -c -nologo /MDd /W3 /Gm /GX /Zi /Od /I "%ROOTSYS%\includ
e" /D "WIN32" /D"_DEBUG" /D "_WINDOWS" /D "_AFXDLL" mfc.cxx
mfc.cxx
e:\users\root\include\TPad.h(349) : warning C4244: '=' : conversion from 'double
' to 'float', possible loss of data
e:\users\root\include\TPad.h(356) : warning C4244: '=' : conversion from 'double
' to 'float', possible loss of data
e:\users\root\include\TPad.h(368) : warning C4244: '=' : conversion from 'double
' to 'float', possible loss of data
e:\users\root\include\TPad.h(378) : warning C4244: '=' : conversion from 'double
' to 'float', possible loss of data

Hope this helps,
Valery

=================================================================
Dr. Valeri Faine (Fine)
------------------- Phone: +1 516 344 7806
Brookhaven National Laboratory FAX : +1 516 344 4206
Bldg. 510A /STAR mailto:fine@bnl.gov
Upton, New York, 11973-5000 http://nicewww.cern.ch/~fine
USA

Dr. Valery Fine Telex : 911621 dubna su
-----------
LCTA/Joint Inst.for Nuclear Res. Phone : +7 09621 6 40 80
141980 Dubna, Moscow region Fax : +7 09621 6 51 45
Russia mailto:fine@main1.jinr.dubna.su