OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Programming => Topic started by: Dan Eicher on July 24, 2025, 12:11:22 am

Title: OS/2 WARP Programming for Dummies by Blake Watson
Post by: Dan Eicher on July 24, 2025, 12:11:22 am
Does someone have or know where I can download the code?
Thanks!
Title: Re: OS/2 WARP Programming for Dummies by Blake Watson
Post by: Dan Eicher on July 25, 2025, 01:26:40 pm
A better answer, than re-typing examples in by hand, but not as good as a debugged sample disk, will be for me to cut and paste some of the examples from the full text edition, re-edit and debug.

https://archive.org/stream/os2warpprogrammingfordummies/OS2%20Warp%20Programming%20for%20Dummies_djvu.txt
Title: Re: OS/2 WARP Programming for Dummies by Blake Watson
Post by: Dariusz Piatkowski on July 25, 2025, 01:36:14 pm
Dan,

I've got a few chapters of code saved up on my machine here...they are all circa 1999, so either because I was actually going through that stuff myself (which at some point in time I actually did, so a quick QC pass through the source should be done first LOL), or perhaps I actually downloaded them from somewhere.

If you want to just grab these I can literally ZIP the directory structure and post on my web server?

-Dariusz
Title: Re: OS/2 WARP Programming for Dummies by Blake Watson
Post by: Martin Iturbide on July 25, 2025, 04:35:40 pm
Hello

I also have interest on a transcript of the samples to put them on the OS2World Github (https://github.com/orgs/OS2World/repositories?q=DEV-SAMPLES). I have several samples there and if it's possible to include the samples from this book I will appreciate it.

Dan, if you are playing the OS/2 programming and you want to share any sample on Github, I will be happy to also include those. (no pressure)

Regards
Title: Re: OS/2 WARP Programming for Dummies by Blake Watson
Post by: Martin Iturbide on July 30, 2025, 06:14:38 pm
Hello Dan

Grok does some decent OCR by copy+paste the images to the prompt and telling it to get you the code without inventing anything new.

You can try it out. Here I attach some samples to Chapter 5.

Regards
Title: Re: OS/2 WARP Programming for Dummies by Blake Watson
Post by: Dave Yeo on July 30, 2025, 11:51:00 pm
I found that the examples I tried didn't compile without fixes. That was using OpenWatcom. Should return to it but my copy is falling to pieces.
Title: Re: OS/2 WARP Programming for Dummies by Blake Watson
Post by: Dan Eicher on July 31, 2025, 12:02:04 am
Maybe because openwatcom vs watcom from 8watts?
Title: Re: OS/2 WARP Programming for Dummies by Blake Watson
Post by: Dave Yeo on July 31, 2025, 12:08:43 am
Maybe because openwatcom vs watcom from 8watts?

Possibly, or perhaps my environment, it was quite a few years back and I can't remember if I used the Toolkit or the OW headers. Now I usually use the toolkits headers and libraries.
Title: Re: OS/2 WARP Programming for Dummies by Blake Watson
Post by: Martin Iturbide on August 01, 2025, 04:58:01 am
Hello.

Nobody asked for this, but I tried to compile Chapter 18 (GPI) with gcc and wrc. ยจ

Sadly it is compiling, but it does not run. Maybe the AI changed something on the OCR. But I had to remove the ACCELERATE stuff from the .RC.

Regards
Title: Re: OS/2 WARP Programming for Dummies by Blake Watson
Post by: Dave Yeo on August 01, 2025, 07:03:38 am
Quickly looking, the source takes a couple of pages in my book so I didn't feel like comparing it.
You need an #include <stdlib.h>, I put it after the #include<string.h>
I tried rc 4.00.011 and got,
Code: [Select]
Creating binary resource file GPI.RES
RC:  RCPP -E -D RC_INVOKED -W4 -f GPI.RC -ef W:\OS2\RCPP.ERR -I W:\usr\include\os2tk45\inc -I W:\usr\include\os2tk45\gl -I W:\usr\include\os2tk45

GPI.RC
GPI.RC(16) RC: error - undefined keyword or key name: ACCELERATE.

GPI.RC(16) RC: error - Resource Type keyword expected - '1000'.
RC: 2 errors detected

Seems every RC has its own problems so figuring out the right one would be a good idea.