Windows NT 3.1 SDK (1993) under Wine: build NT 3.1 programs with cl386, link32 and nmake
49
The Win32 SDK for Windows NT 3.1 (July 1993) in a container. Build programs for Windows NT 3.1 with the original Microsoft tools. They run under Wine on 32-bit Debian.
cl386 8.00.3190a: the C compiler. cl is the same compiler.link32 2.42: the linker. link32 -dump works like dumpbin.nmake 1.12, with the SDK's ntwin32.mak.lib32, rc, cvtres, mc, masm386 5.NT.02, cvdump, cvpack, undname, and the rest of the SDK's i386 tools.The programs you build are i386 NT 3.10 console or GUI programs. They run on Windows NT 3.1 and every later 32-bit Windows. Many also run under Wine in this image.
Go to your project folder and run nmake there:
docker run --rm --platform linux/386 -v "$PWD":/src tenox7/nt31sdk nmake
--platform linux/386 stops a warning about the platform.!include <ntwin32.mak>
all: hello.exe
hello.obj: hello.c
$(cc) $(cflags) $(cvars) hello.c
hello.exe: hello.obj
$(link) $(conflags) -out:hello.exe hello.obj $(conlibs)
$(guiflags) and $(guilibs).$(cvarsmt) with $(conlibsmt) or $(guilibsmt).$(rc) -r app.rc, then $(cvtres) -$(CPU) app.res -o app.rbj, then link app.rbj.$(implib) -out:my.lib a.obj b.obj runs lib32.docker run --rm --platform linux/386 -v "$PWD":/src tenox7/nt31sdk cl386 -c -W3 hello.c
docker run --rm --platform linux/386 -v "$PWD":/src tenox7/nt31sdk link32 -dump -headers hello.exe
docker run --rm --platform linux/386 -v "$PWD":/src tenox7/nt31sdk wine hello.exe
docker run --rm -it --platform linux/386 -v "$PWD":/src tenox7/nt31sdk bash
cl386 cl link32 lib32 nmake rc cvtres mc masm386 cvdump cvpack undname.wine-mstools TOOL ARGS, for example wine-mstools rebase./src, which is Z:\src for the tools. Relative paths work.Z: path. This works alone, or after an option such as -Fo/src/out/x.obj or -out:/src/x.exe./opt/mstools, with bin, h and lib.SETENV sets on NT:
CPU=i386INCLUDE=Z:\opt\mstools\hLIB=Z:\opt\mstools\lib-e, for example -e 'INCLUDE=Z:\src\inc;Z:\opt\mstools\h'.nmake fail, and docker run fails too.masm386 is MASM 5. It has no .model flat. End its command line with ; and put quotes around it, so the shell does not take the ;: masm386 -Mx "file.asm;".-it.docker build --platform linux/386 -t nt31sdk .
mstools/ must hold the SDK's bin, h and lib folders. On the NT 3.1 SDK CD they are MSTOOLS\BIN\I386, MSTOOLS\H and MSTOOLS\LIB\I386.
Content type
Image
Digest
sha256:673de4bb5…
Size
504.4 MB
Last updated
1 day ago
docker pull tenox7/nt31sdk