
刚下载了一个C程序,里面有makefile文件,在VS2010中运行时,提示说找不到头文件,可是该头文件存在,请问 5
1个回答
展开全部
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."
当然这个做法应该是比较复杂而且针对大规模工程的。对于你的这个程序,提示“找不到头文件”的是哪个文件呢?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询