So, I’m a bit confused on this error that I’m getting while compiling/linking a C++ project.
In the Input section of the Linker configuration, we have a additional dependency with the file name Jsfwbase12D.lib. This file was recently changed to Jsfwbase12.lib without the capital D. I changed the references within the project to the new file name and then attempted to re-compile and got the below error message.
Error 2 fatal error LNK1104: cannot open file 'Jsfwbase12D.lib' m5gaddrs m5gaddrs
I opened up the vcproj file in notepad and searched for the old file name and it found zero results.
Does anyone have any idea why the linker isn’t looking for the correct file and instead trying to find the old one?
Edit:
I opened the obj file in notepad and found the old Jsfwbase12D.lib reference. So it appears that’s why the linker is failing. Now the real question is, why is the compiler inserting those references for debug mode if they are not specified anywhere?
/DEFAULTLIB:"Jsfwbase12D.lib"
Your code likely contains
#pragma comment(lib, "Jsfwbase12D.lib")somewhere. This informs the linker of a dependency which gets included during link time.