Note that there are some explanatory texts on larger screens.

plurals
  1. POCppUTest examples build fails
    primarykey
    data
    text
    <p>I am new to mac! I download the xcode4.2 and tried to build CppUTest-v3</p> <p>1)when I do make, I have the following logs</p> <pre><code>compiling AllTests.cpp compiling AllocationInCppFile.cpp compiling CheatSheetTest.cpp compiling CommandLineArgumentsTest.cpp compiling CommandLineTestRunnerTest.cpp compiling JUnitOutputTest.cpp compiling MemoryLeakDetectorTest.cpp compiling MemoryLeakOperatorOverloadsTest.cpp compiling MemoryLeakWarningTest.cpp compiling NullTestTest.cpp compiling PluginTest.cpp compiling PreprocessorTest.cpp compiling SetPluginTest.cpp compiling SimpleStringTest.cpp compiling TestFailureTest.cpp compiling TestFilterTest.cpp compiling TestHarness_cTest.cpp compiling TestInstallerTest.cpp compiling TestMemoryAllocatorTest.cpp compiling TestOutputTest.cpp compiling TestRegistryTest.cpp compiling TestResultTest.cpp compiling UtestTest.cpp compiling AllocationInCFile.c compiling TestHarness_cTestCFile.c compiling CommandLineArguments.cpp compiling CommandLineTestRunner.cpp compiling JUnitTestOutput.cpp compiling MemoryLeakDetector.cpp compiling MemoryLeakWarningPlugin.cpp compiling SimpleString.cpp compiling TestFailure.cpp compiling TestFilter.cpp compiling TestHarness_c.cpp compiling TestMemoryAllocator.cpp compiling TestOutput.cpp compiling TestPlugin.cpp compiling TestRegistry.cpp compiling TestResult.cpp compiling Utest.cpp compiling UtestPlatform.cpp Building archive lib/libCppUTest.a ar: creating archive lib/libCppUTest.a a - objs/src/CppUTest/CommandLineArguments.o a - objs/src/CppUTest/CommandLineTestRunner.o a - objs/src/CppUTest/JUnitTestOutput.o a - objs/src/CppUTest/MemoryLeakDetector.o a - objs/src/CppUTest/MemoryLeakWarningPlugin.o a - objs/src/CppUTest/SimpleString.o a - objs/src/CppUTest/TestFailure.o a - objs/src/CppUTest/TestFilter.o a - objs/src/CppUTest/TestHarness_c.o a - objs/src/CppUTest/TestMemoryAllocator.o a - objs/src/CppUTest/TestOutput.o a - objs/src/CppUTest/TestPlugin.o a - objs/src/CppUTest/TestRegistry.o a - objs/src/CppUTest/TestResult.o a - objs/src/CppUTest/Utest.o a - objs/src/Platforms/Gcc/UtestPlatform.o Linking CppUTest_tests ld: library not found for -lgcov clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [CppUTest_tests] Error 1 </code></pre> <p>I found out that I can build by using the llvm make command </p> <pre><code>CC=/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc-4.2 make Linking CppUTest_tests Running CppUTest_tests .................................................. .................................................. .................................................. .................................................. .................................................. ........................................... OK (293 tests, 293 ran, 791 checks, 0 ignored, 0 filtered out, 7 ms) </code></pre> <p>2)Then I cd to the examples directory. I got the following errors. I tried to investigate but could not find out how to solve it. Your help will be appreciated. </p> <pre><code>compiling AllTests.cpp compiling CircularBuffer.cpp compiling CircularBufferTest.cpp compiling EventDispatcher.cpp compiling EventDispatcherTest.cpp compiling HelloTest.cpp compiling MockDocumentationTest.cpp ApplicationLib/MockDocumentationTest.cpp:193:85: warning: expression result unused [-Wunused-value] mock_c()-&gt;actualCall("foo")-&gt;withIntParameters("integer", 10)-&gt;returnValue().value.doubleValue; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~ 1 warning generated. compiling Printer.cpp compiling PrinterTest.cpp compiling hello.c Building archive lib/libCppUTestExamples.a ar: creating archive lib/libCppUTestExamples.a a - objs/ApplicationLib/CircularBuffer.o a - objs/ApplicationLib/CircularBufferTest.o a - objs/ApplicationLib/EventDispatcher.o a - objs/ApplicationLib/EventDispatcherTest.o a - objs/ApplicationLib/HelloTest.o a - objs/ApplicationLib/MockDocumentationTest.o a - objs/ApplicationLib/Printer.o a - objs/ApplicationLib/PrinterTest.o a - objs/ApplicationLib/hello.o Linking CppUTestExamples_tests Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "mock(SimpleString const&amp;)", referenced from: TEST_EventDispatcher_EventWithRegistrationForEventResultsIntoCallback_Test::testBody() in libCppUTestExamples.a(EventDispatcherTest.o) TEST_EventDispatcher_RegisterTwoObserversResultIntoTwoCallsAndARegistrationNotification_Test::testBody() in libCppUTestExamples.a(EventDispatcherTest.o) TEST_GROUP_CppUTestGroupEventDispatcher::setup() in libCppUTestExamples.a(EventDispatcherTest.o) TEST_GROUP_CppUTestGroupEventDispatcher::teardown() in libCppUTestExamples.a(EventDispatcherTest.o) ObserverMock::notify(Event const&amp;, int)in libCppUTestExamples.a(EventDispatcherTest.o) ObserverMock::notifyRegistration(EventObserver*) in libCppUTestExamples.a(EventDispatcherTest.o) productionCode() in libCppUTestExamples.a(MockDocumentationTest.o) ... "MockNamedValue::getIntValue() const", referenced from: TEST_MockDocumentation_returnValue_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o) TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o) "MockNamedValue::~MockNamedValue()", referenced from: TEST_MockDocumentation_returnValue_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o) TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o) "MockSupport::setData(SimpleString const&amp;, int)", referenced from: TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o) "MockSupport::setDataObject(SimpleString const&amp;, SimpleString const&amp;, void*)", referenced from: TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o) "MockSupport::getData(SimpleString const&amp;)", referenced from: TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o) "MockNamedValue::getObjectPointer() const", referenced from: TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o) "_mock_c", referenced from: TEST_MockDocumentation_CInterface_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o) "_mock_scope_c", referenced from: TEST_MockDocumentation_CInterface_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o) ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make: *** [CppUTestExamples_tests] Error 1 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload