LNK1104 cannot open x.lib - c++

I keep getting this error but the weird part is that the project comiles and runs fine. I can't see where the problem is, and i am sure it must find that library to work ok.

Probally there is an invalid reference for x.lib in your project configuration.
If it's compiling and working fine, maybe you have a valid and an invalid configuration for x.lib.

Related

MSB6006 error when code used to work fine in visual studio C++

I'm getting the 'MSB6006 "CL.exe" exited with code 2' error. The problem is that my code used to work fine. The issue came when I tried to add another library from xtensor (the xtensor-blas) and I couldn't get it to work correctly. I just erased everything I tried to add and get a clean run, but it now fails every time.
While trying to compile the Error List says things like "C1083 fatal error: cannot open source file: 'files that I have deleted'". Whenever I stop the build, it then only gives the MSB6006 error.
It has become extremely frustrating since my code is identical to what it used to be and now doesn't work.
Is there any way around this?
Answer given by Quentin: There may still be references in the vcxproj file created by Visual Studio. Delete those references and it should work.

why i am receiving cant open file 'opencv_core2411d.obj'

I am tryin to use openCV-2.4.11 library in visual studio 2013, to do so i followed
this tutorial and this slideshare tutorial
unfortunately, every time i run any C++ code even "Hello world", the compiler generates this error Link: fatal error LINK1104: cant open file 'opencv_core2411d.obj'
I also referred to some question in SO but they were not detailed or they discuss importing opencv library but in another IDE not visual studio.
note: the libs i used as input to the linker in the field 'Additional Dependencies':
opencv_calib3d2411d.lib
opencv_contrib2411d.lib
opencv_core2411d.lib
opencv_features2d2411d.lib
opencv_flann2411d.lib
opencv_gpu2411d.lib
opencv_haartraining_engined.lib
opencv_highgui2411d.lib
opencv_imgproc2411d.lib
opencv_legacy2411d.lib
opencv_ml2411d.lib
opencv_nonfree2411d.lib
opencv_objdetect2411d.lib
opencv_photo2411d.lib
opencv_stitching2411d.lib
opencv_ts2411d.lib
opencv_video2411d.lib
opencv_videostab2411d.lib
and i am using win8
please provide steps to successfully import opecv2.4.11 into visula studio and let me know why i am receivin this error
In my experience the linker error:
Link: fatal error LINK1104: cant open file 'opencv_core2411d.obj'
usually means that the linker cannot find the file. This is generally because the linker properties are not correct.
Check the property page under linker->"Additional Library Directories" and make sure that it is filled in and the path is correct.
Depending on how you have the project setup you may have different settings for debug and release configurations.
I was also having the same problem for quite a time and after searching everywhere in the internet i finally got the solution.
These input files are correct but you need to give the full path in Linker->Input->Additional Dependencies. i will show you how.
C:\opencv\build\x64\vc12\lib\opencv_calib3d2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_contrib2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_core2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_features2d2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_flann2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_gpu2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_highgui2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_imgproc2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_legacy2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_ml2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_objdetect2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_ocl2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_photo2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_stitching2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_superres2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_ts2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_video2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_videostab2411d.lib
Also in Linker->General->Use Library Dependency Input, Click on yes
This should certainly help.

Directory of the release folder for dll generation

I am linking dll with my app. It seems that there are no errors and it's being recognised in a good way.
but I am having an error of LINK 1181:
Error 3 error LNK1181: cannot open input file 'c:\users\xxx\Project\Release\mydll.lib
What could be the problem for that?
Update: I am getting a new message now which says the program can't start because tulips.dll is missing from your computer. Try reinstalling the program to fix this problem!!!!
It seems that mydll.lib can not be found by the project.
LNK1181: The linker could not find filename because it does not exist or the path was not found.
=> From the project, can you 2x click on it and see if VS2010 finds it?

trying to use the basic tutorial for ogre in code::blocks produces undefined references to '__unwind_resume' and '__gxx_personality_v0'

When following this tutorial I'm getting the following errors: undefined reference to '__unwind_resume' and undefined reference to '__gxx_personality_v0'
The file producing these undefined reference error's is libboost_system-mgw47-mt-1_51.a. I have already tried the following fixes to no avail:
Forcing Code::blocks to use g++ instead of gcc.
Result: No change
Adding-lstdc++ to the list of libraries the linker links to.
Result: 39 more errors in addition to the __unwind_resume and __gxx_personality_v0 undefined reference errors.
Installing the latest MingW and pointing my compiler to use it instead of its own version
Result: Compiler errors now exceeds max value :(
image2 http://s24.postimage.org/3u6tik4dh/moreerrors2.jpg
Any help troubleshooting these errors is appreciated, I really want to get this thing working.
I found part of the solution, I got the compiler to create an executable file, but it currently throws OGRE::filenotfoundexception and terminates. I did this by downloading boost_1_53_0 and building libboost_system-mgw47-mt-1-53.a and linking to that instead of the other one, then it gave me the error on startup "the procedure entry point __gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll." So to work around that I went to orwell's mingw folder and found that libstdc++-6.dll in that folder was around 800 KB in size and the one codeblocks was using was 5 mb, I switched them out to see if it worked and it got the executable running now but it throws said exception and terminates.
EDIT1: Strangely enough simply adding a blank file called resources.cfg (the file that caused the exception) causes the program to run but now an Ogre windows appears asking for a rendering system
EDIT2: After realizing I'm supposed to copy everything from ogre's bin/release directory to my executable files directory (and the media directory to 2 folders up from my executables directory) I did that and everything finally worked perfectly!

ERROR LNK1104 - .`obj` file without any file name

I am trying to compile a project where i am getting this error. I am very new to c++ and dont know much about VC++. And the most irritating part is that the error does not mention a name to the .obj file!!! Here is the whole error [copied from Error List] :
Error 1 error LNK1104: cannot open file '.\Debug\.obj' E:\7zsrc\CPP\7zip\Bundles\Format7zF\LINK 7z
To be more specific, I am compiling the Format7zF bundle included with 7z source version 9.22ß. I have already tried most of the solutions out there but most times either the the problem is different or the solution does not work.
Any help would be great!
Thanks
Update
I just noticed [from the .log file] that at the end of the linker Debug\\.obj was added! Hope this explains the problem more!
Update 2
I am attaching a copy of the project. You can examine the project by opening the solution from [ExtractionPathOfTheArchive]\CPP\7zip\Bundles\Format7zF\ Directory. Hope someone can help.
Link to Project Source("d.zip")
I have just converted the source files from VC++6 to VC++12 and changed the Output File Path in linker to inherit from..., nothing else.
It's Too late, but for records. :)
I had same problem, when I converted the 'QUAKE' project from VC6 to VS2010.
I solved it by changing setting of '.s' files (asm code file).
Check [Properties/Configuaration Properties/Custom Build Setup/General/Outputs]
and there are "$(InputName).obj" macro, then try to change it as "%(Filename).obj".