Search code examples
c#visual-c++linkervisual-studio-2017

LNK1181 cannot open input file. space error?


I am having an compile error while trying to build my Windows Forms Project.

My solution contains:

  • 2 c# projects (one that creates a binary & one that is just a class with functions)
  • 2 C++ projects (imported from another solution)

After import I had to re-reference the "Include Directorys" in the (project)Settings->VC++ Directories

These 2 solutions work but Im trying to have one solution instead of 2 ( them toghether. After import I had to re-reference the "Include Directorys" in the (project)Settings->VC++ Directories

And now I am getting this error:

Error: LNK1181 cannot open input file

"C:\SDK\Bin\x64 Release\\VS2017-PC.lib"

There are 3 problems with this link:

  • It contains a double backslach

  • It has a folder that is missing (C:\PC)

  • There is the name "Release" instead of debug

The path should look like this:

'C:\PC\SDK\bin\x64 debug\VS2017-PC.lib'

I think it is because my folder "x64 debug" contains a space and is creating this error. But I dont know how to rename and refresh the paths correctly inside the solution and I dont even know if that would really fix this error.

Image of project Property Pages


Solution

  • The solution was to create the missing folder. For some reason Visual studio didnt create "x64 debug" in the right directory.