small medium large xlarge

James2009_pragsmall
15 Sep 2017, 10:10
James Grenning (183 posts)

Hi

Sorry for the various build problems. gcc/clang/cpputest are all moving targets. I have updated the build and instructions in case you run into any problems. Find the book code here on my github account.

Please let me know if you have troubles.

James

Generic-user-small
26 Oct 2017, 17:10
Deya Sanchez (2 posts)

Hello

Just purchased the book.

Build fails with errors.

cpputest code: Git commit a56318c2f02f0ef355c0ba6f7c0df4bc1a539795

Example code: Git commit 28108d713d67b98affd92af92bac5806c3f98524 does not build on

System: Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial g++ (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609

Most errors are of this flavour:

tools/cpputest/include/CppUTest/MemoryLeakDetectorNewMacros.h:63:10: error: ‘void operator delete(void, size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Werror=c++14-compat] void operator delete (void mem, size_t size) UT_NOTHROW;

Please advise.

James2009_pragsmall
26 Oct 2017, 18:25
James Grenning (183 posts)

You can fix that error in the makefile with:

CPPUTEST_CXXFLAGS += -Wno-c++14-compat
CPPUTEST_CFLAGS += -Wno-SOME-C-ONLY-WARNING
CPPUTEST_CXXFLAGS += -Wno-SOME-C++-ONLY-WARNING
CPPUTEST_CPPFLAGS += -Wno-SOME-C-or-C++ONLY-WARNING

It is likely you will get other warnings. They are easy to fix once you get the pattern. Here is the usual pattern:

CPPUTEST_CFLAGS += -Wno-SOME-C-ONLY-WARNING
CPPUTEST_CXXFLAGS += -Wno-SOME-C++-ONLY-WARNING
CPPUTEST_CPPFLAGS += -Wno-SOME-C-or-C++ONLY-WARNING

HTH!

James

Generic-user-small
27 Oct 2017, 12:54
Deya Sanchez (2 posts)

Thank you very much for the prompt response that did the trick.

I’m not trying to be funny but is it possible to do tdd for set-up scripts or Makefiles? We run into this sort of issue all the time when someone tries an installation on a different environment.

Wonder if some sort of experimental workspace or vm where there is a clean system could be used for testing installations. Been scratching my head wondering how this could be automated.

James2009_pragsmall
02 Nov 2017, 12:56
James Grenning (183 posts)

I am in the process of setting up a docker build environment. So there will be at least one working environment :-) . I expect I’ll add others as time goes by.

James

You must be logged in to comment