Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 错误生成:**[unit_test]在Google测试中_C++_Makefile_Googletest - Fatal编程技术网

C++ 错误生成:**[unit_test]在Google测试中

C++ 错误生成:**[unit_test]在Google测试中,c++,makefile,googletest,C++,Makefile,Googletest,我有一个名为Movies的项目,我在Google Test上运行了一些测试。我包括了整个项目,并开始运行测试: #include "gtest/gtest.h" #include "Counter.h" #include <iostream> using namespace std; TEST(CodeTest, failTest) { Counter c; EXPECT_EQ( 7, c.getValue() ); } TEST(CodeTest, plusEqualsCon

我有一个名为Movies的项目,我在Google Test上运行了一些测试。我包括了整个项目,并开始运行测试:

#include "gtest/gtest.h"
#include "Counter.h"
#include <iostream>
using namespace std;


TEST(CodeTest, failTest)
{
Counter c;
EXPECT_EQ( 7, c.getValue() );
}

TEST(CodeTest, plusEqualsConstructor)
{
Counter f,g;
f=g+1;
EXPECT_FALSE(f==g);

}
起初它按预期工作,然后它给了我以下奇怪的错误:

make:*** [unit_test] Error 1

有人知道问题是什么吗?谢谢

你能提供你正在使用的makefile吗?我真的不知道我的makefile是什么意思以及我是如何找到它的。。对不起,伙计。。你能解释一下或者告诉我如何找到它吗?如果你得到一个错误行,声称有一个
make
错误,你正在运行
make
,作为构建过程的一部分,因此你应该使用一个(可能生成的)
Makefile
。你的开发环境和构建工具链?上面列出的错误是什么?<代码>错误1 <代码>行?C++构建,我的工作区是Eclipse…我没有第一个以上的错误
make:*** [unit_test] Error 1