将生成文件转换为VS项目 [英] Convert a makefile to a VS project

查看:217
本文介绍了将生成文件转换为VS项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些makefile为我建立某些库. 为了方便起见,我现在需要将它们转换为VS项目.我用谷歌搜索只是找到了在VS提供的makefile向导的帮助下将VS项目转换为makefile的方法. 另外,我确实发现VS6中包含此功能,可以将makefile转换为VS项目.但是此功能已在更高版本中删除.另外,我意识到msdn站点上不再提供VS6下载.

I have a few makefiles to build certain libraries for me. I now need to convert them to a VS project for convenience sake. I googled only to find the ways to convert a VS project to a makefile with the help of makefile wizard provided by VS. Also, I did find that there was this feature included in VS6 to convert the makefile into VS project. But this feature has been removed for the later versions. Also, I realized that VS6 downloads are no more available on the msdn site.

还有其他方法可以将Makefile转换为Visual Studio项目吗? 或者 我可以从某处获得VS6吗?

Is there any other way to convert a makefile to a visual studio project? or Can I get hold of VS6 from somewhere?

推荐答案

这里唯一真正的选择是手动进行转换(或使用Makefile项目向导).您说您有几个" makefile,不知道有多少个,但是除非您在谈论> 10左右,为这些手动创建Visual Studio项目并不是一件容易的事.毕竟,您要做的就是创建一个新的dll项目并向其中添加源文件.默认的编译器/链接器标志几乎不需要任何调整.哦,是的,如果您要进行调整,请确保在属性表中而不是在项目本身中进行这些更改:该属性表可以被其他项目重用,这是DRY原理的简单问题.

The only real option you have here is to manually do the conversion (or use the Makefile Project Wizard). You say you have 'a few' makefiles, don't know how much that is, but unless you're talking about > 10 or so it's not that much work to manually create a Visual Studio project for these. After all, all you do is create a new dll project and add source files to it. The default compiler/linker flags hardly need any tweaking. Oh yeah if you do tweak them, make sure to do those changes in a property sheet instead of in the project itself: the property sheet can be reused by other projects, it's a simple matter of the DRY principle.

为什么这是唯一的真实选择?首先,没有一种工具可以可靠地将任意生成文件转换为VS项目,这很简单,因为生成文件可以采用您想要的任何格式,并且它们的许多功能在VS项目中根本没有.其次,VS6迄今已有15年的历史了,因此,即使您让它在计算机上运行,​​它所产生的输出仍然是古老的,绝对不是您想要用于项目的输出.

Why is this the only real option? Firstly there is no tool that can reliably convert any arbitrary makefile to a VS project, simpy because makefiles can be in any format you want and a lot of their functionality simply has no counterpart in a VS project. Secondly, VS6 is at this date about 15 years old so even if you get it to run on your machine, the output it produces is still ancient and definitely not what you want to use for your projects.

这篇关于将生成文件转换为VS项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆