• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 72
  • Last Modified:

Does someone knows how to get rid of this warning in visual studio 2015?

Visual Studio LINK warning LNK4098
1 Solution
This warning appears if you could be running a debug library and a release compiled library in the same build.

Go through your project options and select to use the debug versions of any 3rd party libraries you use.
the main reason for this warning is that different kinds of the runtime library was used by different files. say if you compiled a source by using single-threaded runtime library (or linked against a .obj or .lib file which was compiled with single-threaded runtime library) and have another source that was compiled with multi-threading debug runtime library.

see https://msdn.microsoft.com/en-us/library/6wtdswk0.aspx

you can find out what is going wrong by doing a build with the /VERBOSE:LIB option. you can add this build option by going to the linker properties - command line and add the option by directly editing the 'All Options' window. if you then start the build, the build output should contain all libraries which are searched. if there is both libc.lib and libcmt.lib in the output, you have found one of the differences which caused the linker warning.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now