Such a situation: I used to work on VS08, but now I had to install a studio on business, at first there were problems with libraries loaded in the project, but then these problems disappeared. Now I have other problems, namely when launching one project in release mode, he writes an error:

1>LINK : fatal error LNK1181: cannot open input file 'kernel32.lib'

(when running in debug mode everything goes fine), and when you start another project in debug mode, he writes

1>LINK : fatal error LNK1104: cannot open file 'msvcprtd.lib'

(launch release is successful). How to solve the problem and what is it connected with?

    4 answers 4

    This may be due to project options and Visual Studio options, namely: the list of plug-in libraries does not contain those indicated in the error messages or Visual Studio cannot find them. To fix, do the following - go to the project properties and there for the release and debug option, explicitly register the missing libraries in the list of linked libraries.

    Well, sometimes similar problems arise if the library is linked with incompatible runtime.

    • All libraries are registered and physically located in the system. And it is possible in more detail about "the library with incompatible runtime is linked" - legik
    • There is a ready-made library something.lib, which was built on a previous version of MSVC, and, for example, libc is included in it. There are no sources for it. If you now link it to a project that requires a later version of libc, then a version conflict may well arise. Usually, this is done by choosing the "Runtime library - multi-threaded DLL" option, although it may not help. - stanislav

    This error has just occurred. For those who will google and stumble on this topic I will write that this error may also occur due to setting the paths for the output and obj-files for the same for two projects in one sulution. Before compiling a project, its directories for output and obj-files are cleared.

      In Qt Creator, such errors occur if specified in the project settings "shadow assembly". Turn it off - the error disappears.

      In this case, based only on experience. I had such errors when I forgot to turn off the "shadow build". Although I don’t know the root cause of the error, as I don’t know the essence of the “shadow assembly”. Just someone can help and such information.

        Just change your DEBUG to RELEASE