Skip to main content
1-Visitor
October 3, 2019
Question

LNK1104: cannot open file error

  • October 3, 2019
  • 1 reply
  • 4340 views

Hi all,

I get error LNK1104: cannot open file when I uses VS 2015, but I dont have error when i use VS2010

Kindly help

1 reply

14-Alexandrite
October 4, 2019

What file it causing the error.

If is one of the object files of your application then first thing I'd suggest is to try again.

I'm seeing this behavior sometimes. It is almost like the compiler does not release the lock on the file fast enough.

If the error comes from one of the library files the you need to compare the settings between VS2015 and VS2010.

Also, if your paths or filenames includes spaces make sure the path is surrounded by quotes.

 

Here is the link to the Microsoft documentation about this error:

https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk1104?view=vs-2019

 

ms-61-VisitorAuthor
1-Visitor
October 5, 2019
I used a make file to create a toolkit application, using VS2015. When I try to compile my code I get error message cannot open file 'protoolkit. H'
14-Alexandrite
October 7, 2019

Let's try to clarify something. At this point you already talk about two different errors. When you opened this thread you mentioned error LNK1104. This is a linker error

On your replay you mention the error message at the compile time about not finding 'protoolkit. H' . This is a different kind of error. Most likely C1083

Here are some things for you to look for:

1. Make sure your source code calls for 'protoolkit.h' There is no space between dot and letter h.

2. If the error persists make sure the compiler knows where to look for include files by using the -I switch in the compile flags.

3. After you clear all compiler errors you can move to the linker errors as I described in my previous replay.