Open Watcom V2(2)
Open Watcom V2 をコンパイルしました。
付属のサンプルを使って、Win16, Win32 のプログラムをコンパイルしてみました。
環境変数をいちいち設定するのが嫌だったので、次のよう SHELL スクリプトを作り、パスの通った場所に、watcom という名前で保存し実行権を付けました。
#! /bin/bash export PATH=/usr/local/bin/watcom/binl:$PATH export WATCOM=/usr/local/bin/watcom export INCLUDE=/usr/local/bin/watcom/h $*
今回は、付属のサンプル bld/src/win/shootgal をコンパイルして実行してみました。
$ cd bld/src/win/shootgal/win16 $ watcom wmake Open Watcom Make Version 2.0 beta Aug 22 2021 06:14:43 (32-bit) Copyright (c) 2002-2021 The Open Watcom Contributors. All Rights Reserved. Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved. Source code is available under the Sybase Open Watcom Public License. See http://www.openwatcom.org/ for details. wcc -zW -I"../.." -I"/usr/local/bin/watcom/h" -I"/usr/local/bin/watcol wrc -q -r -I.. -I"/usr/local/bin/watcom/h/win" -fo=./shootgal.res -btc %create shootgal.lnk wlink @shootgal.lnk wrc shootgal.res Open Watcom Windows and OS/2 Resource Compiler Version 2.0 beta Aug 22 2021 06:44:11 (32-bit) Copyright (c) 2002-2021 The Open Watcom Contributors. All Rights Reserved. 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.
shootgal.exe が出来上がりました。DOSBox-X の Windows3.1 で動かしてみました。

問題なく動きますね。Win32 もコンパイルしましたが、こちらも動きました。リソースファイルの作り方がわからないですが、それを作ることができれば、Win16, Win32 のプログラムをコンパイルできます。テキストなので、エディタで書けないこともありません。でも、いまさら Win32 のプログラムを作ってもねぇ。まあ、今後、絶対に Win32 を使うことはないとは言い切れませんが。
ディスカッション
コメント一覧
まだ、コメントがありません