#19 flag main() outside of main.cpp as a problem

open
Tony Allevato
3
2012-12-09
2006-11-29
No

If you define main() in a file other than main.cpp, the Eclipse CxxTest plug-in will detect it just fine. However, the C++ TDD plug-in on Web-CAT cannot detect it, and it will be incorrectly included in the compile/link sequence, causing linker errors.

Since the CxxTest plug-in in Eclipse already detects main(), it would be best to address this issue by adding a feature. First, add an option to the preferences panel to control whether or not a "misplaced main() method" is flagged or not. Second, if this option is turned on, the CxxTest plug-in could simply flag main() in a differently-named file as a warning to show up in the problems view.

Discussion