Hi Martin, good job fixing the warnings, though if we turn on all warnings by adding -Wall to the bitcat2.obj rule, there are these,
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);
| ^~~~~~~~~~~~~
| |
| 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 *'}
6138 | BOOL APIENTRY WinRegisterClass (HAB hab, PCSZ pszClassName, PFNWP pfnWndProc,
| ~~~~~^~~~~~~~~~~~
bitcat2.c:39:53: warning: pointer targets in passing argument 4 of 'WinCreateStdWindow' differ in signedness [-Wpointer-sign]
39 | &flFrameFlags, szClientClass, NULL,
| ^~~~~~~~~~~~~
| |
| CHAR * {aka char *}
In file included from W:/usr/include/os2.h:39,
from bitcat2.c:4:
W:/usr/include/os2emx.h:6003:33: note: expected 'PCSZ' {aka 'const unsigned char *'} but argument is of type 'CHAR *' {aka 'char *'}
6003 | PULONG pflCreateFlags, PCSZ pszClientClass, PCSZ pszTitle,
| ~~~~~^~~~~~~~~~~~~~
bitcat2.c: In function 'ClientWndProc':
bitcat2.c:70:57: warning: pointer targets in passing argument 3 of 'DevOpenDC' differ in signedness [-Wpointer-sign]
70 | hdcMemory = DevOpenDC(hab, OD_MEMORY, "*", 0L, NULL, 0);
| ^~~
| |
| char *
In file included from W:/usr/include/os2.h:39,
from bitcat2.c:4:
W:/usr/include/os2emx.h:9979:51: note: expected 'PCSZ' {aka 'const unsigned char *'} but argument is of type 'char *'
9979 | HDC APIENTRY DevOpenDC (HAB hab, LONG lType, PCSZ pszToken, LONG lCount,
| ~~~~~^~~~~~~~
gcc -Zomf bitcat2.obj bitcat2.def -o bitcat2.exe
As for the error you see, GNU make is helpfully trying to do the first rule, "bitcat2 : bitcat2.exe" and compile bitcat2. Fix is to change bitcat2 to all so the first rule is "all : bitcat2.exe"