Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
649 views
in Technique[技术] by (71.8m points)

visual studio - Convert a makefile to a VS project

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.

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...