c++ - 在 Windows 7 中创建 POSIX 应用程序?

标签 c++ windows visual-studio posix sua

那么,POSIX 子系统还在吗? 我有 Visual Studio 2012。我试图编译一个“hello world”Posix 应用程序,它似乎缺少入口点:

>cl stuff.cpp /Fostuff.obj /link /subsystem:posix

LINK : error LNK2001: unresolved external symbol __PosixProcessStartup unlink.exe : fatal error LNK1120: 1 unresolved externals

一些谷歌搜索显示我需要 psxdll.lib 和其他一些库,但它们在哪里? Visual Studio 没有它们,最新的 Windows SDK 也没有。他们是否在不告诉任何人的情况下悄悄扼杀了创建 POSIX 应用程序的能力?

最佳答案

这需要 Windows 7 旗舰版或企业版。一组最小的 Microsoft Subsystem for Unix-based Applications (SUA)已安装,但您必须从 Microsoft 下载其余部分:

http://www.microsoft.com/en-us/download/details.aspx?id=2391

Until the download package Utilities and Software Development Kit for Subsystem for UNIX-based Applications (Utilities and SDK for SUA) has been installed on the computer, you cannot run or modify UNIX-based scripts and custom UNIX-based applications.

关于c++ - 在 Windows 7 中创建 POSIX 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20339358/

相关文章:

javascript - 如何使用适用于 Windows 和 Mac 的 Node.js 或 ElectronJS 读取硬盘利用率和统计信息

c++ - 将 using/typedef 限制在类范围内

javascript - 我可以在调试时只输入 "step over"jQuery 代码吗?

visual-studio - 构建 cordova 时出错,获取 "nodevars.bat is not recognized"和 "Invalid attribute predicate"

c++ - Visual Studio,Xutility错误

c++ - 如何将对象作为另一个对象的父对象并通过旋转影响其位置(使对象围绕其他对象旋转)

c++ - LNK2001 只有一些内联函数没有解决?

c++ - 在 C++ 中使用指针作为映射的值

c++ - 为什么 select() 总是超时? ( window )

c - 程序在 Linux 和 Windows 上挂起,似乎在 Mac 上运行