Hi everyone,
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:
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 ?
Thanks
Souvik
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone,
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:
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 ?
Thanks
Souvik
Edit: I wanna pull that off without disturbing the existing sources in the project.