Using Visual Studio for OS/2 Development

Anyone still using OS/2 will either agree that the available developer tools for OS/2 are not excellent or be wrong.

After installing Watcom C in my remaining OS/2 installation I found its IDE almost unusable. It had no editor for source code. And OS/2's epm.exe editor is no

So I figured I should install Watcom C on Windows 10. This resulted in some of the same problems.

I finally decided simply to use Visual Studio.

I just had to point an empty project to Watcom's header files.


However, to get Intellisense working with those header files, I had to remove all APIENTRY markers because Visual Studio does not recognise them.

Running this command in PowerShell solved the problem. It simply removed the APIENTRY and APIENTRY16 markers everywhere. (Make sure to make the output encoding ASCII to avoid a byte order marker which OS/2 and the Watcom compiler cannot handle.)

dir -re *.h|%{$file=cat $_;$file=$file -replace "APIENTRY16 ","" -replace "APIENTRY ","";$file|out-file $_.fullname -Encoding ascii}

And the result is Visual Studio with working Intellisense for OS/2 APIs:


Have fun!

 © Andrew Brehm 2016