刚下载了一个C程序,里面有makefile文件,在VS2010中运行时,提示说找不到头文件,可是该头文件存在,请问 5

makefile文件是干什么用的?如何才让该程序正常运行。谢谢... makefile文件是干什么用的?如何才让该程序正常运行。谢谢 展开
 我来答
Shuang784
2012-02-25 · 超过55用户采纳过TA的回答
知道答主
回答量:153
采纳率:0%
帮助的人:167万
展开全部
makefile是linux或unix下的编译链接文件,你在VS2010中是不需要的。把你的C程序拷出来,用VC2010重新创建下工程,再把相互之间的连接关系修改下,应该就可以了。。多少个文件的程序啊?
追问
谢谢,有若干个头文件,一个.cpp文件,不好意思,刚开始学程序,如何修改连接关系?
追答
网上找到一段话:
4. If you have a project that you build from the command line with a makefile, then the Visual Studio development environment will not recognize your project. To open and build your project using Visual Studio, first create an empty project containing the appropriate build settings using the Makefile Project Wizard. You can then use this project to build your project from the Visual Studio development environment. So, it means: if you just want to make use of VS to build your makefile based project, above work is enough; but if you want to totally transfer to VS IDE as building system, you need to manually OR by some tools to convert your makefile to be VS project file. On stackoverflow Convert nmake makefile into Visual Studio 2005 project :
"you either need to make a new project file with the make file (and all references to the code are in the make file, it just compiles in the VS IDE), or you need to re-create the functionality of the make file in a new project that functions as a "real" VS project with files and such."

当然这个做法应该是比较复杂而且针对大规模工程的。对于你的这个程序,提示“找不到头文件”的是哪个文件呢?
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式