title: NuGet version of gtest not linking in VS2015
body: <p>After unsuccessfully trying the solutions suggested here:
  <a href="https://stackoverflow.com/questions/28886725/how-to-compile-and-link-google-tests-in-c-project-in-visual-studio-2013-but-wi">How to compile and link google tests in C++ project in Visual Studio 2013 but with Gtest installed by NuGet Package Manager?</a></p>
  
  <p>and only finding copies of these answers on other sites in desperation I am now representing this issue for consideration.</p>
  
  <p>I have also been unsuccessful at trying to build either gtest or gmock in visual studio 2015 from downloads from github.</p>
  
  <p>I confess that my patience is somewhat strained at this point.</p>
  
  <p>EDIT:
  Here is the dump on attempting to compile after implementing the changes suggested:</p>
  
  <pre><code>1&gt;------ Build started: Project: Bank_Account, Configuration: Debug Win32 ------
  1&gt;Build started 19/03/2016 8:40:33 AM.
  1&gt;     1&gt;
  1&gt;InitializeBuildStatus:
  1&gt;         Touching "Debug\Bank_Account.tlog\unsuccessfulbuild".
  1&gt;       ClCompile:
  1&gt;         All outputs are up-to-date.
  1&gt;         All outputs are up-to-date.
  1&gt;     1&gt;
  1&gt;gtestd.lib(gtest-all.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in Bank_Account.obj
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(osfinfo.obj) : error LNK2005: __open_osfhandle already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(dosmap.obj) : error LNK2005: __errno already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(winapisupp.obj) : error LNK2005: ___crtSetUnhandledExceptionFilter already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(winapisupp.obj) : error LNK2005: ___crtTerminateProcess already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(winapisupp.obj) : error LNK2005: ___crtUnhandledException already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(dbgheap.obj) : error LNK2005: __calloc_dbg already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(dbgheap.obj) : error LNK2005: __free_dbg already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(dbgheap.obj) : error LNK2005: __malloc_dbg already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(invarg.obj) : error LNK2005: __invalid_parameter already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(lconv.obj) : error LNK2005: _localeconv already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(wsetloca.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(dbgrptw.obj) : error LNK2005: __CrtDbgReportW already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(printf.obj) : error LNK2005: _printf already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;LIBCMTD.lib(vprintf.obj) : error LNK2005: _vprintf already defined in MSVCRTD.lib(MSVCR120D.dll)
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(ios.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in Bank_Account.obj
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(ios.obj) : error LNK2005: "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" (?_Addstd@ios_base@std@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP120D.dll)
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(ios.obj) : error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP120D.dll)
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(locale0.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in Bank_Account.obj
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(locale0.obj) : error LNK2005: "void __cdecl std::_Facet_Register(class std::_Facet_base *)" (?_Facet_Register@std@@YAXPAV_Facet_base@1@@Z) already defined in msvcprtd.lib(locale0_implib.obj)
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP120D.dll)
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(bool)" (?_Init@locale@std@@CAPAV_Locimp@12@_N@Z) already defined in msvcprtd.lib(MSVCP120D.dll)
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z) already defined in msvcprtd.lib(MSVCP120D.dll)
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP120D.dll)
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(cerr.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in Bank_Account.obj
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(iosptrs.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in Bank_Account.obj
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(locale.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in Bank_Account.obj
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(xlock.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in Bank_Account.obj
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in msvcprtd.lib(MSVCP120D.dll)
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP120D.dll)
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(xthrow.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in Bank_Account.obj
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(xthrow.obj) : error LNK2005: "void __cdecl std::_Xbad_alloc(void)" (?_Xbad_alloc@std@@YAXXZ) already defined in msvcprtd.lib(MSVCP120D.dll)
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(xthrow.obj) : error LNK2005: "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z) already defined in msvcprtd.lib(MSVCP120D.dll)
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(xthrow.obj) : error LNK2005: "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPBD@Z) already defined in msvcprtd.lib(MSVCP120D.dll)
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(wlocale.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in Bank_Account.obj
  1&gt;     1&gt;
  1&gt;libcpmtd.lib(xlocale.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in Bank_Account.obj
  1&gt;     1&gt;
  1&gt;LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
  1&gt;     1&gt;
  1&gt;LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
  1&gt;     1&gt;
  1&gt;C:\Users\Richard\documents\visual studio 2015\Projects\Bank_Account\Debug\Bank_Account.exe : fatal error LNK1169: one or more multiply defined symbols found
  1&gt;
  1&gt;Build FAILED.
  1&gt;
  1&gt;Time Elapsed 00:00:01.47
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>