Re: root w/Watcom

Valery Fine (Valeri.Faine@cern.ch)
Mon, 19 May 1997 00:44:40 +0100


On 18 May 97 at 11:59, Sverre JARP wrote:

> After the success with Microsoft under NT, I decided to try to
> compile with Watcom, especially to use its code profiling
> capability.
>
> But I get 5 errors:
>
> 1)G__ci.h (line 558): type cannot be defined or declared in return
> type.
> (line 565): same
> Nenad and I tried to define G__ANSI but it did not help. This error
> occurs in all files using this header file.
>
> 2) global.h (line 498): linkage specification is different from
> previous declaration in G__security(line 86)
>

These belong CINT and I wonder Masa may find time to comment.

> 3) win32_win32listviewctl.cpp(line 224): too many initialisers.
>

This line looks as follows:

Int_t indx = index;

where index is defined as "Int_t index"

I have no idea why your compiler doesn't like this.

> 4) win32_win32treeviewctl.cpp(line 224): missing return value.
> Should you not put the 'return 0' statement after the 'if' ? Then it
> works.

Are you sure it was line 224. Could you send me the piece of code
or some other information (name of subroutine/method for example).
I FOUND no "if" and wrong "return" aroung line 224. See yourself:

//______________________________________________________________________________
LRESULT APIENTRY TWin32TreeViewCtrl::OnNotify(LPARAM lParam)
{
// CallBack function to manage the notify messages
// We have to create our own copy of this message;

UINT code = (UInt_t)(((LPNMHDR) lParam)->code);
NM_TREEVIEW *Tree = (NM_TREEVIEW *)lParam;

switch (code) {
case NM_RCLICK:
return -1; // means mouse event has been detected
case TVN_ITEMEXPANDED:
return OnItemExpanded(Tree);
case TVN_ITEMEXPANDING:
return OnItemExpanding(Tree); <===== line 224 (at least for me)
case TVN_SELCHANGED:
return OnSelectChanged(Tree);
case TVN_SELCHANGING:
return OnSelectChanging(Tree);
case TVN_DELETEITEM:
return OnDeleteItem(Tree);
default:
break;
}
return 0;
}


>
> 5) winnt_winntsystem.cpp(line 224): '_mkdir' not declared. Watcom
> needs 'mkdir' here. Solved.

What did you mean - Solved. No compilation error doesn't mean - Solved.
MS uses "_" prefix for all non_ANSI names.

>

Ohhh!. I wonder the "224" is a magic number. May be your compiler doesn't
like this combination "2+2+4"
=================================================================
Dr. Valery Fine Telex : 911621 dubna su
-----------
LCTA/Joint Inst.for NuclearRes Phone : +7 09621 6 40 80
141980 Dubna, Moscow region Fax : +7 09621 6 51 45
Russia mailto:fine@main1.jinr.dubna.su

Dr. Valeri Faine
------------ Phone: +41 22 767 6468
CERN FAX : +41 22 767 7910
CH-1211 Geneva, 23 mailto:fine@mail.cern.ch
Switzerland http://nicewww.cern.ch/~fine