Go编译的二进制文件是否可以在Windows NT上运行,包括使用以太网端口?

问题描述

是的,Windows NT仍然是某些人必须处理的事情。

我想知道是否有可能在NT上运行使用Go编译的二进制文件并使用以太网端口进行通信(MQTT)。如果是这样,我该怎么办?

我承认在这种情况下我没有进行测试,因为我在当前环境中根本无法获得Win NT。

解决方法

我认为这不会起作用。我下载了使用Go的Caddy,并在其中运行dumpbin。我得到了:

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

因此Windows的最低受支持版本是NT6,即Vista。

这似乎得到ticket的支持:

Go 1.10是支持Windows Vista或更低版本的最新版本

并且:

我们计划宣布Go 1.10将成为支持Windows XP的Go的最新版本。

因此Go的旧版本支持Windows XP及更高版本。新版本需要Vista或更高版本。