首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu 14.04 cpputest示例构建失败

Ubuntu 14.04 cpputest示例构建失败
EN

Stack Overflow用户
提问于 2016-01-18 17:38:43
回答 1查看 764关注 0票数 1

我通过以下方式在Ubuntu上安装了cpputest:

代码语言:javascript
复制
sudo apt-get install cpputest

现在,我尝试构建书中的示例,但失败了:

代码语言:javascript
复制
augre@ubuntu:~/tddec-code$ make
make -i -C code
make[1]: Entering directory `/home/augre/tddec-code/code'
make -f MakefileCppUTest.mk
make[2]: Entering directory `/home/augre/tddec-code/code'
MakefileCppUTest.mk:60: /build/MakefileWorker.mk: No such file or directory
make[2]: *** No rule to make target `/build/MakefileWorker.mk'.  Stop.
make[2]: Leaving directory `/home/augre/tddec-code/code'
make[1]: [all] Error 2 (ignored)
make -f MakefileUnity.mk
make[2]: Entering directory `/home/augre/tddec-code/code'
Running BookCode_Unity_tests
Unity test run 1 of 1
..........!............................................................
-----------------------
71 Tests 0 Failures 1 Ignored
OK
make[2]: Leaving directory `/home/augre/tddec-code/code'
make[1]: Leaving directory `/home/augre/tddec-code/code'
make -i -C code-t0
make[1]: Entering directory `/home/augre/tddec-code/code-t0'
Makefile:42: /build/MakefileWorker.mk: No such file or directory
make[1]: *** No rule to make target `/build/MakefileWorker.mk'.  Stop.
make[1]: Leaving directory `/home/augre/tddec-code/code-t0'
make: *** [all] Error 2

它似乎找不到apt-get安装cpputest的位置。

我怎么才能弄清楚这一点并指出它呢?

EN

回答 1

Stack Overflow用户

发布于 2016-01-18 19:10:40

我在以下目录中找不到文件MakefileWorker.mk

代码语言:javascript
复制
sudo apt-get install cpputest 

已创建。

所以决定删除这些文件

代码语言:javascript
复制
apt-get remove cpputest

然后下载源代码:

代码语言:javascript
复制
cd /home/augre/bin
git clone git://github.com/cpputest/cpputest.git

然后:

代码语言:javascript
复制
$ cd cpputest_build
$ autoreconf .. -i
$ ../configure
$ make

然后设置环境变量

代码语言:javascript
复制
export CPPUTEST_HOME=/home/augre/bin/cpputest

然后修复另一个构建错误:

代码语言:javascript
复制
cp /home/augre/bin/cpputest/cpputest_build/lib/* /home/augre/bin/cpputest/lib/
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34851443

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档