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

LNK1104: cannot open file error

  • October 3, 2019
  • 1 reply
  • 4344 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 9, 2019

Please study the Protoolkit and Visual Studio documentation.

Under the <LoadPoint Directory>\protoolkit\x86e_win64\obj you will find the following two zip files:

protk_install_example.zip - this one contains a sample project that use a makefile

pt_install_cxx.zip - this zip file contains a complete VS2015 solution. You need to set the CREO_INSTALL environment variable to point to the creo loadpoint directory, for this to work.

 

If your project is based on a makefile you need to study the "Running the Microsoft Visual Studio Solution" section from the tkuse.pdf and the protk_install_example.zip

 

If you are using an non-makefile project make sure you use the same options as in pt_install_cxx solution.

On the Visual Studio documentation look at least for how to specify additional Include directories for the compiles and how to specify additional libraries for the linker.