Windows Visual Studio 2008 中的 Unix Makefile
我已经进行了不错的搜索,但似乎找不到一种方法让 Visual Studio 2008 使用 unix Makefile,甚至无法从 Makefile 创建一些与 MSVC 兼容的等效文件。 有人有想法或类似的问题吗?
注意:我已经知道使用 Makefile 的优点/缺点,并且我不想听你的意见。 我现在感兴趣的是从一些只有 Makefile 的原始 UNIX 代码创建一个 Windows 库,并从中获取一些功能。
TIA。
I've done a decent search, but can't seem to find a way to get Visual Studio 2008 to use a unix Makefile, or even to create some MSVC compatible equivalent from the Makefile. Does anyone have ideas or similar issues?
Note: I already know the benefits/drawbacks of using Makefiles or not, and I don't want to hear your opinion. All I'm interested in right now is creating a Windows library from some originally unix code which only has a Makefile, and getting something functional out of it.
TIA.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以做的是从现有代码创建一个项目。 Visual C++ 在没有 makefile 的情况下编译得非常好。
您还可以安装 MinGW,它具有 make 和编译器。
http://www.mingw.org/
What you can do is create a project from existing code. Visual C++ does a pretty good job at compilation without makefiles.
You could also install MinGW and that has
make
and the compilers.http://www.mingw.org/
通常,我看到人们会以相反的方式使用它们:使用 make 作为主构建系统,并让它调用 Visual Studio 以批处理模式构建其内容。
我身上没有 2008,但是使用 VisualStudio2005,您可以使用类似这样的规则构建一个解决方案
(注意:在这个示例中我必须使用空格,因为制表符只会将我带到下一个字段。)
Typically what I see people do is use them the other way around: Use make as the master build system and have it invoke Visual Studio to build its stuff in batch mode.
I don't have 2008 on me, but w/ VisualStudio2005 you can build a solution with a rule something like this
(Note: I had to use spaces in this example, as tab just takes me to the next field.)
使用
nmake
命令行工具。 请注意,它并不支持 GNU Make 所做的一切,因此您可能需要编辑 Makefile 以使其兼容,但它是最接近您想要的东西。Use the
nmake
commandline tool. Note it doesn't support everything that GNU Make does so you may need to edit the Makefile to make it compatible but it's the closest thing to what you want.您还可以将 cccl 与 为 Windows 制作。
You can also use cccl with make for windows.