Skip to content

OS/2 SDK

C programs for OS/2 with clang-retro's clang, picolibc and JWlink:

Target Triple Output Runs on
16-bit OS/2 1.x i8086-pc-os2 NE program or DLL OS/2 1.x, and 2.x to 4.x and ArcaOS
32-bit OS/2 i386-pc-os2 LX program or DLL OS/2 2.0 to 4.x, eComStation, ArcaOS
clang --target=i386-pc-os2 -Os hello.c -o hello.exe               # 32-bit
clang --target=i386-pc-os2 -mwindows -Os pmhello.c -o pmhello.exe # 32-bit PM
clang --target=i386-pc-os2 -shared -Os mylib.c -o MYLIB.DLL       # 32-bit DLL
clang --target=i8086-pc-os2 -Os hello.c -o hello.exe              # 16-bit, small model
clang --target=i8086-pc-os2 -mcmodel=large -Os app.c -o app.exe   # 16-bit, large model
clang --target=i8086-pc-os2 -shared -Os mylib.c -o MYLIB.DLL      # 16-bit DLL
python3 tools/os2-imports.py MYLIB.DLL > mylib.lnk                # its imports
clang --target=i8086-pc-os2 -Os app.c -Wl,@mylib.lnk -o app.exe   # a program that uses it