Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7744827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:51:42+00:00 2026-06-01T09:51:42+00:00

I have installed google test as it’is described here . But when I try

  • 0

I have installed google test as it’is described here. But when I try to use tests for my current project, I get 2 LNK4098 warnings:

defaultlib ‘MSVCRTD’ conflicts with use of other libs; use /NODEFAULTLIB:library

and the same for ‘LIBCMTD’, and a bunch of LNK2005 errors. But when I actually ignore these two default libraries, it doesn’t help: I get even more errors. What’s the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:51:43+00:00Added an answer on June 1, 2026 at 9:51 am

    You have to ensure googletest and your project are built using the same version of the C Runtime Library (CRT). Google test (currently v1.6.0) provides 2 Visual Studio solution files; gtest-1.6.0\msvc\gtest.sln which uses the static version and gtest-1.6.0\msvc\gtest-md.sln which uses the dynamic (dll) version. By default, projects created via Visual Studio use the dll version.

    You need to decide whether you want your project to use the static or dynamic versions of the CRT.

    To set your project to use the static versions, go to Project->Properties and at the top left of the window, select Configuration: Debug. Then in this same window select Configuration Properties -> C/C++ -> Code Generation. The option for Runtime Library should be Multi-threaded Debug (/MTd).

    You then need to ensure you’re linking to the appropriate versions of gtest, so select Configuration Properties -> Linker -> Input. Edit the Additional Dependencies field by providing the full path to the Debug version of the gtest library (e.g. C:\gtest-1.6.0\msvc\gtest\Debug\gtestd.lib).

    Do the same again for Release Configuration, but setting the Runtime Library option to Multi-threaded (/MT) and providing the full path to the Release version of the gtest library (e.g. C:\gtest-1.6.0\msvc\gtest\Release\gtest.lib).

    If you decide you want to use the dll versions of the CRT, choose Multi-threaded Debug DLL (/MDd) and Multi-threaded DLL (/MD), and link to the gtest-md libraries which will be in gtest-1.6.0\msvc\gtest-md\... rather than gtest-1.6.0\msvc\gtest\....

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed CherryPy 3.1.0,. Here is what happens when I try to run
I have installed Google Toolbox for Mac into Xcode and followed the instructions to
I have installed the latest STS but it don't have any samples in it.
I have configured my email.yml in my Redmine installation, but when I try to
I have just downloaded the Newest Google Chrome to test my gwt app... And,
I've recently installed VS2008. The project I'm working on uses vstest and I have
For some reason, my visual studio 2008 installation doesn't have the Create Test Project
I have weird situation in newly installed server, and it seems that Google can't
I don't want to have the user install Google Gears so I can show
I have installed and setup RubyCAS-Server and RubyCAS-Client on my machine. Login works perfectly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.