包含目录Visual Studio 2010

时间:2014-06-02 22:57:35

标签: c++ c visual-studio-2010

当我尝试#include "postgres.h"时,我收到此错误IntelliSense: cannot open source file "postgres.h"

我试图通过将其添加到字段末尾添加到Include目录:$(pathContainingHeaderFile)。尝试#include "postgres.h"

时,错误仍然存​​在

如果我#include "pathContainingHeaderFile\postgres.h"出现了不同的错误,则无法找到postgres.h引用的文件。

2 个答案:

答案 0 :(得分:1)

您应该只将; pathContainingHeaderFile附加到包含目录,即省略$()部分。删除#include行中的路径,它应该可以正常工作。

答案 1 :(得分:0)

您可以尝试将头文件复制粘贴到放置可执行文件的同一个地图中。