0
votes

Working on getting CPPUTest working with sample application code. I modified couple of make files to get this compiled but now I am facing linker error which states "multiple definition of `main'"

This is probably because I have one main in AllTests.cpp this is where we call CommandLineTestRunner::RunAllTests(ac, av) and another main is the main of my application code. Is there a way where this could be handled.

1

1 Answers

0
votes

Create a library of the functions which you want to unit-test. Link this library to your unit-test application. Link the same library to your "main" application.