I’m trying to create an
ncurses Pomodoro timer application using the C skeleton and
minunit.h. When I was writing the timer code, it was fine, because I hadn’t written the main application yet, so I could happily write and execute unit tests. But now as I try to write the
ncurses interface, I can only
make the main app, not the tests. Attempting to run
make tests fails with a
multiple definition of main error. I understand that this is because of how the
RUN_TESTS macro of
minunit.h works. Is there a way to get both working? My search engine skills seem to have failed me, as I can’t seem to find the right search terms to use.
If it’s any help, the Makefile I’m using is here, adapted from the
c-skeleton Makefile to work for applications as opposed to libraries.