Compiling Notes

From OS2World.Com Wiki
Revision as of 19:25, 21 April 2023 by Martini (talk | contribs)
Jump to navigation Jump to search

PM Code Errors/Warnings with GCC

CHAR * {aka char *}

Warning
gcc -Wall -Zomf -c -O2 bitcat2.c -o bitcat2.obj
bitcat2.c: In function 'main':
bitcat2.c:36:29: warning: pointer targets in passing argument 2 of 'WinRegisterClass' differ in signedness [-Wpointer-sign]
  36 |       WinRegisterClass(hab, szClientClass, ClientWndProc, CS_SIZEREDRAW, 0);
     |                             ^19:25, 21 April 2023 (CEST)19:25, 21 April 2023 (CEST)~~
     |                             |
     |                             CHAR * {aka char *}
In file included from W:/usr/include/os2.h:39,
                from bitcat2.c:4:
W:/usr/include/os2emx.h:6138:47: note: expected 'PCSZ' {aka 'const unsigned char *'} but argument is of type 'CHAR *' {aka 'char *'}
Fix

I replaced

static CHAR  szClientClass[] = "BitCat2";

for

unsigned char     szClientClass[] = "BitCat2";

and warnings were removed.


Linkers

Resource Compiler

Error 1
Reading binary resource file walker.res

(0) RC: error - Only integer TYPE allowed ().
RC: 1 error detected

make: *** [walker.exe] Error 1
No idea.
Error 2
[E:\PROJECTS\SAMPLEPACK\PMWALKER]make   2>&1  | tee make.out
wrc -r walker.rc
Open Watcom Windows and OS/2 Resource Compiler Version 2.0beta1 LA
Portions Copyright (c) 1993-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
walker.rc(2): Error! E062:  Unable to open 'os2.h'
make: *** [walker.res] Error 9
No Idea