Ask Your Question

LINK : fatal error LNK1104: cannot open file '.obj'

asked 2013-10-19 17:14:13 -0500

FL3SH gravatar image

updated 2013-10-20 04:42:54 -0500

berak gravatar image


I am new, and I has big problem with bulid my simple program. I using many tutorials, instructions and I can't solve it. I edit variable's path, add in:
C/C++->General->Additionals Include Directories->MyOpenCv\build\include
Linker->General->Additionals Library Directories->MyOpenCv\build\x86\vc11\lib
Linker->Input->Additional Dependencies->I added .libs
The same in Debug and Release.

Windows 8 x64, VS2012 x32, OpenCV 2.4.5

Please help me I struggling with this for 3 days.

edit retag flag offensive close merge delete


have you included MYOpenCv\build\include\opencv and MYOpenCv\build\include\opencv in c/c++->General->Additional Include Directories

zulfiqar gravatar imagezulfiqar ( 2013-10-20 01:18:10 -0500 )edit
zulfiqar gravatar imagezulfiqar ( 2013-10-20 01:19:28 -0500 )edit

I am follow your tutorial and... I has new error: LINK : fatal error LNK1104: cannot open file 'opencv_highguiv245.lib'

FL3SH gravatar imageFL3SH ( 2013-10-20 03:36:24 -0500 )edit

opencv_highgui245.lib // without the 'v'

berak gravatar imageberak ( 2013-10-20 04:41:32 -0500 )edit

yes its opencv_highgui245.lib

zulfiqar gravatar imagezulfiqar ( 2013-10-20 05:10:33 -0500 )edit

thank you now it's working ;)

It is normal when I debug program form, I get about 10 output info: "...vc11\bin\opencv_core245.dll'. Cannot find or open the PDB file." and last output info: "The program '[2080] Test1.exe' has exited with code -1 (0xffffffff)."

FL3SH gravatar imageFL3SH ( 2013-10-20 08:09:13 -0500 )edit

yes, normal. the pdb files are not supplied ( size ). you only need them if you want to debug the opencv libs. most likely you won't need them. otherwise, you can rebuilt the whole opencv libs using cmake, this will generate the pdb's as well.

berak gravatar imageberak ( 2013-10-20 08:41:41 -0500 )edit

ok, to solve this problem: "The program '[2080] Test1.exe' has exited with code -1 (0xffffffff)." I need to rebuilt opencv with cmake?

One more, when I VideoCapture my namedWindow look likes "Ć®ý€őňáüV" why?

FL3SH gravatar imageFL3SH ( 2013-10-20 09:20:57 -0500 )edit

no no. it seems more, that you're linking the wrong libs. check for debug <--> release, 32 <--> 64 bit, vs version

since vs usually starts in DEBUG mode, you need to link against the libs in the debug folder. they all should have a 'd' at the end. for release build, choose those from the release folder ( without 'd' ). don't mix them ! ( that will result in funny errors like the ones you getting )

berak gravatar imageberak ( 2013-10-20 09:32:44 -0500 )edit

I change DEBUG libs, now they all have 'd' and I has the same strange char in my video window after debug... Edit: Win 7 with 2.4.6 I hasn't problems with window name ;)

FL3SH gravatar imageFL3SH ( 2013-10-20 12:27:58 -0500 )edit

2 answers

Sort by » oldest newest most voted

answered 2015-02-16 16:17:33 -0500

diefray gravatar image

This error is because you forgot write ".LIB" in additional dependencies

edit flag offensive delete link more

answered 2013-10-20 05:11:02 -0500

zulfiqar gravatar image
edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2013-10-19 17:14:13 -0500

Seen: 10,413 times

Last updated: Oct 20 '13