I am currently using Visual Studio 2013 to learn TDD. It is most likely going to be the enviroment I am going to use to test with. I am having trouble using Link-Time substition. In apendix A1.2 of Test Driven Development for embedded C, James talks about how the make file creates the production code library first, then creates the test object (.o) files next, and when the compiler links them it uses the symbols from the object files to resolve unresolved symbols first. In using Visual Studio, I have tried creating a library file from the production code, including that .lib file in the tests project and compiling. Even with separating the two projects like this, it still gives me an error saying that the function is already defined.
I am just wondering if anyone knows of how to do this in Visual Studio without using a makefile? I have never used a make file before, and would rather not try to learn another tool while still getting the hang of TDD. Is it possible at all? If not, does anyone have any suggestions on a quick way to understand makefiles? I have tried to use things like cmake, but I guess they are assuming I know something I don’t because I still feel lost.
I feel that this sort of thing should be totally doable in Visual Studio, but for the life of me, I can’t figure out how. Thank you in advance.