[comp.os.os2.misc] PM Programming, PM SDK, and MS C600

wbonner@eecs.wsu.edu (Wim Bonner) (12/06/90)

Actually, I just trioed some more with my previous problem with the 
Star5.c code from petzolds book.  It seems that I CAN do it with the
C6 header files, I only run into problems when I am trying to do the
stuff from within PWB instead of using a seperate make file.

It dies on line 21 of the os2def.h file with 2 errors: C2054 and C2059.

As I don't have this problem when I do not use PWB, I'm at a loss to explain
it.  If anyone has a suggestion, I'd really like to hear it, as I have gotten
to like PWB recently.

Wim.
-- 
|  wbonner@yoda.eecs.wsu.edu  |
| 27313853@wsuvm1.csc.wsu.edu |
|   27313853@Wsuvm1.BITNET    |
|  72561.3135@CompuServe.com  |

ballard@cheddar.ucs.ubc.ca (Alan Ballard) (12/06/90)

In article <1990Dec05.210500.16571@eecs.wsu.edu> wbonner@eecs.wsu.edu (Wim Bonner) writes:
>...  It seems that I CAN do it with the
>C6 header files, I only run into problems when I am trying to do the
>stuff from within PWB instead of using a seperate make file.
  
There is a note in the README.DOC file that comes with MSC 6.0 about this.
See section 4, "Building PM applications in PWB".  It specifically
mentions the Petzold examples.  Basically, the problem has to do with
exactly what compiler options and function attributes are used for the 
programs. 
 
Alan Ballard                   | Internet: ballard@ucs.ubc.ca
University Computing Services  |   Bitnet: USERAB1@UBCMTSG
University of British Columbia |    Phone: 604-228-3074
Vancouver B.C. Canada V6R 1W5  |      Fax: 604-228-5116

rommel@lan.informatik.tu-muenchen.dbp.de (Kai-Uwe Rommel) (12/06/90)

In article <1990Dec05.210500.16571@eecs.wsu.edu> wbonner@eecs.wsu.edu (Wim Bonner) writes:
>Actually, I just trioed some more with my previous problem with the 
>Star5.c code from petzolds book.  It seems that I CAN do it with the
>C6 header files, I only run into problems when I am trying to do the
>stuff from within PWB instead of using a seperate make file.
>
>It dies on line 21 of the os2def.h file with 2 errors: C2054 and C2059.

Look for the -Za and -Ze C 6.00 options. The line 21 of os2def.h
contains the "far" keyword which is only available when -Ze is
specified. The "far" keyword was used with C 5.1 while C 6.00 provides a
new keyword "_far" for the same purpose for ANSI compatibility with a
leading underscore. The older "far" keyword is still available for
upward compatibility but only when -Ze is specified to CL. Therefore you
should look for "ANSI compatiblity" or a similar named option in the PWB
menus (I don't have the name in mind) and set it correctly.

Kai Uwe Rommel

--
/* Kai Uwe Rommel
 * Munich
 * rommel@lan.informatik.tu-muenchen.dbp.de
 */