2014-02-13 194 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