Search code examples
c++visual-studioglfwlnk2001

LNK2019 errors on project that has identical properties to another one that works


Using Visual Studio Community 2017

I have 4 projects:

  1. Static library project that uses GLFW and couple other libraries
  2. ProjectA which uses that library, compiles fine
  3. ProjectB which also uses that library, compiles fine
  4. ProjectC which I recently created and uses the library, does not compile

ProjectC has the same properties as ProjectB and ProjectA, nothing should be different, right?

But somehow, I get these errors when compiling ProjectC:

glfw3.lib(context.obj) : error LNK2001: unresolved external symbol __imp___stdio_common_vsscanf

audio.lib(au.obj) : error LNK2001: unresolved external symbol __imp__stricmp

I tried building GLFW and Audio library from their sources and replaced the project ones with newly built ones, no effect.


Solution

  • Once again, I somehow managed to untick "Inherit from parent or project defaults" checkbox in Additional Include Directories.

    Check your checkboxes everybody!