Link to home
Start Free TrialLog in
Avatar of Hassan NOUR EL DINE
Hassan NOUR EL DINEFlag for Germany

asked on

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

Visual Studio LINK warning LNK4098
ASKER CERTIFIED SOLUTION
Avatar of Misha
Misha
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.

Sara