tdd using cpputest make errors in ubuntu 14.04 -


i trying learn cpputest, went cpputest manual , copied below code in ubuntu 14.04lts laptop, , tried make. new make files, , got bunch of errors - how can correct code?

#include "cpputest/testharness.h" #include "cpputest/testoutput.h"  test_group(firsttestgroup) { };  test(firsttestgroup, firsttest) {     fail("fail me!"); }  test(firsttestgroup, secondtest) {    strcmp_equal("hello", "world");    longs_equal(1, 2);    check(false); } 

that test.cpp, , have main below named test_main.cpp

#include "cpputest/commandlinetestrunner.h"  int main(int argc, char** argv) {    return commandlinetestrunner::runalltests(argc, argv); } 

the make file is:

all: test export cpputest_home=/usr/share/cpputest cppflags += -i$(cpputest_home)/include  ld_libraries = -l$(cpputest_home)/lib -lcpputest -lcpputestext  test: test_main.o test.o     g++ -o mytest test.o test_main.o test_main.o: test_main.cpp      g++ -c test_main.cpp $(cppflags)  test.o: test.cpp      g++ -c test.cpp  $(cppflags) $(ld_libraries)     #g++ -c -o test_main.o test_main.cpp test.o test.cpp $(cppflags)      #g++ -o mytest tet_main.o test.o $(ld_libraries)  clean:     rm -f *.o mytest 

when make bunch of errors.

please me in regard

i changed makefile follows: after changes worked  all: mytest export cpputest_home=/usr/local cppflags += -i$(cpputest_home)/include  ld_libraries = -l$(cpputest_home)/lib -lcpputest -lcpputestext  mytest: test_main.o test.o     g++ -g -o mytest test.o test_main.o $(ld_libraries) test_main.o: test_main.cpp      g++ -g $(cppflags) -c test_main.cpp test.o: test.cpp      g++ -g $(cppflags) -c test.cpp clean:     rm -f *.o mytest 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -