c++ - gTest and multiple main() -


i have eclipse project. testcases in 1 *.cpp file. problem way end 2 main() functions. 1 app , 1 testcases. , eclipse, of course, refuses build... keep under 1 project (and avoid having multiple configurations, svn repositories etc). ideally, want force eclipse build 2 executables (one app , 1 testcases). had quick @ eclipse makefile, honest, don't quite understand how works. possible exclude main.cpp/testcases.cpp , build 1 executable, not elegant...

anybody similar experience?

are linking libgtest_main in addition libgtest? if don't link in libgtest_main should good.

if want create 2 executables eclipse cdt easiest way have each executable have separate project. can have 1 project reference if have common code.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -