1

次の方法で、Ubuntuにcpputestをインストールしました。

sudo apt-get install cpputest

今、本から例を構築しようとしていますが、失敗します:

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 が cputest をインストールした場所が見つからないようです。

どうすればそれを理解し、そこに向けることができますか?

4

1 に答える 1

2

ディレクトリに MakefileWorker.mk ファイルが見つかりませんでした

sudo apt-get install cpputest 

作成した。

そのため、ファイルを削除することにしました

apt-get remove cpputest

次に、ソースをダウンロードします。

cd /home/augre/bin
git clone git://github.com/cpputest/cpputest.git

それから:

$ cd cpputest_build
$ autoreconf .. -i
$ ../configure
$ make

次に、環境変数を設定します

export CPPUTEST_HOME=/home/augre/bin/cpputest

次に、もう 1 つのビルド エラーを修正します。

cp /home/augre/bin/cpputest/cpputest_build/lib/* /home/augre/bin/cpputest/lib/
于 2016-01-18T11:10:39.963 に答える