2011-11-18 143 views
-1

我得到一个编译器错误,我似乎无法弄清楚如何解决。是的,我知道这是一个愚蠢的,但我似乎无法阻止它。我已经在IDE选项中添加了包含VC++目录。任何帮助将不胜感激。致命错误C1083

以下是错误:

Error 1 fatal error C1083: Cannot open include file: 'cppunit/TestFixture.h': No such file or directory c:\...\Application\Test.cpp 5

+0

您是否将包含“cppunit”目录的目录添加到包含列表中? – 2011-11-18 12:50:33

+2

如果该文件位于“c:/a/b/c/cppunit/TestFixture.h”中,则需要指定为包含路径的路径为“c:/ a/b/c”。确保你有这个。 – Mat

+0

不在任何.h或.cpp文件中?我会在哪里添加这个包括? – bigbaz34

回答

1

C:\cppunit-1.12.1\cppunit-1.12.1\include\cppunit is where the file is that it's looking for but I thought that I added that in the visual studio options

在这种情况下,这是错误的:

#include "cppunit/TestFixture.h" 

它应该是:

#include "TestFixture.h" 

既然你已经指定了“ cppunit“包含目录中的路径部分se拟合。