Will Go compiled binaries run on Windows NT including the use of Ethernet ports?

254 views Asked by At

Yes, Windows NT is still a thing that some people have to deal with.

I wonder if it is possible to run a binary compiled with Go on NT and use the ethernet port for communication (MQTT). If so, what do I have to take care of?

I admit that I have not done a test in this case because I simply don't have Win NT in reach in my current environment.

1

There are 1 answers

1
kichik On BEST ANSWER

I don't think it will work. I downloaded Caddy, which uses Go, and ran dumpbin on it. I got:

Microsoft (R) COFF/PE Dumper Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file caddy_windows_amd64.exe

PE signature found

File Type: EXECUTABLE IMAGE

FILE HEADER VALUES
            8664 machine (x64)
...
             223 characteristics
                   Relocations stripped
                   Executable
                   Application can handle large (>2GB) addresses
                   Debug information stripped

OPTIONAL HEADER VALUES
             20B magic # (PE32+)
            3.00 linker version
...
            6.01 operating system version

So the minimum supported version of Windows is NT6 which is Vista.

This seems to be supported by a ticket saying:

Go 1.10 is the last release to support Windows Vista or below

And:

We plan to announce that Go 1.10 will be the last release of Go to support Windows XP.

So old versions of Go supported Windows XP and above. New versions require Vista and above.