Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
I've just started with CppUnit this morning and stuck up in a problem. Basically I have a class interface defined in server.h and its definitions along with it's main() method in server.cpp. This file is in my top level of hierarchy in my project and defines a global variable which is used in the other lower levels.
I have created a few tests using CppUnit and added neccessary stuffs to my existing makefile , something like:
tests_SOURCES=UnitTests/main.cpp UnitTests/FileNamesChecker.cpp server.cpp
Now that naturally gives me a "Multiple Definitions of main()" error, as there UnitTest/main.cpp contains the main method for CppUnit and server.cpp contains the main method for the project. How can I run the test as a separate application ?
Edit: I wanna pull that off without disturbing the existing sources in the project.