2014-02-13 136 views
1
#include <math.h> 
#include <stdlib.h> 
#include "snipmath.h" 
#include <stdio.h> 
#include "prec.h" 
#include <mpir.h> 
#include <mpfr.h> 

我在我的项目在Visual Studio中有一个.c文件,我已经包含上述头文件。除prec.h行外,所有标题都没有错误。我曾尝试将其路径包含在“其他包含目录”中。为什么不能打开这个特定的源文件?无法打开头文件

+2

请问您的帐户有权读它? – alk

+0

显示什么错误? prec.h文件是否存在?如果是在哪个目录?在哪个目录是snipmath.h? –

+0

是的,它确实存在。 prec.h和snipmath.h都在同一个目录中。显示的错误是:无法打开源文件 – user3306419

回答

0

3解决方案:

  1. 虽然徘徊在文件名查找所在。如果prec.h位于项目文件夹之外,则应该提供完整的地址。

  2. 移动prec.h到您的本地项目文件夹

  3. 配置Visual Studio来寻找你的.h文件在您的自定义文件夹

+0

我该如何做第3步?我知道prec.h在我的本地项目文件夹中。 – user3306419

+0

http://stackoverflow.com/questions/335408/where-does-visual-studio-look-for-c-header-files – dinomoth