cpputest/cpputest — pull request #456 by arstrube (2014-12-23 09:10:10+00:00)
Title: not for merging - erroneous

Her my quick and dirty attempt to use linker substitution fails both in GCC and in VS2008.

This is the linker command line:

g++.exe -Lcpputest/lib -Lcpputest/lib -L. -o AllTests.exe out/cpputest/examples/AllTests/AllTests.o out/cpputest/examples/AllTests/CircularBufferTest.o out/cpputest/examples/AllTests/EventDispatcherTest.o out/cpputest/examples/AllTests/HelloTest.o out/cpputest/examples/AllTests/MockDocumentationTest.o out/cpputest/examples/AllTests/PrinterTest.o out/cpputest/src/CppUTestExt/MockActualCall.o out/cpputest/src/CppUTestExt/MockExpectedCall.o -lCppUTest -lCppUTestExt -lApplicationLib

./libApplicationLib.a(hello.o): In function `printHelloWorld':
C:/data/00_Dev/05_CppUTest/cpputest/examples/ApplicationLib/hello.c:32: multiple definition of `printHelloWorld'

It was my understanding that the linker should only take the offending function from ApplicationLib if it wasn't defined already?