Googletest: NuGet package "gtest" and Microsoft Visual Studio 2015 (toolset version 1900)

Created on 30 Aug 2016  路  9Comments  路  Source: google/googletest

I have tried to use google test framework as NuGet package.

When I try to build it I get an error message.
I would like to stress this line:

error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1900' in Source.obj

Where Source.obj - is Source.cpp:

#include "gtest/gtest.h"

TEST(test1, case1) {
  EXPECT_EQ(0, 0);
}

int main(int argc, char **argv) {
  ::testing::InitGoogleTest(&argc, argv);
  RUN_ALL_TESTS();
  system("pause");
  return 0;
}

I consider it's not good to change toolset in my project configuration because after that I will not be able to install any other package compiled with other toolset versions, won't I?

Also, I've tried to fix a problem using packages called "fix8.dependencies.gtest" and "fix8.dependencies.gtest.symbols" but it didn't help.

I have also tried this and this

GC Attention Set

Most helpful comment

All 9 comments

@KindDragon Thank You, I will try and report to you.
But I hope that official package will be fixed.

@KindDragon Thank You!
The unofficial package proposed by you works well.
I think the issue should remain opened, shouldn't it? (Problem with official package still remains)

I am confirming the issue with the official package. The unofficial package fixed it for me as well.

I'm also having this problem with the official package.

I am also having the same problem with the official package.
(Unofficial package also solves the issue)

I have the same problem, which is solved as well by using unofficial package "googletest.v140.windesktop.static.rt-dyn".
Visual C++ 2017

Thank you everyone for this report.
What exactly is "the official package"? Please note that googletest has no relationship with NuGet, I am not aware how nuget packages are created and not sure what "Official" means. However if someone does know a proper PR would be welcome

I have been cleaning up older and inactive GitHub googletest issues. You may see an issue "closed" if it appears to be inactive/abandoned
Thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Joebeazelman picture Joebeazelman  路  5Comments

ElectricRCAircraftGuy picture ElectricRCAircraftGuy  路  4Comments

tschijnmo picture tschijnmo  路  4Comments

maygamboa picture maygamboa  路  6Comments

kdawgwilk picture kdawgwilk  路  3Comments