Error LNK1181: cannot open file '..\..\lib\Release\opencv_core2411.lib

asked 2015-12-03 00:32:26 -0500

I am using Opencv 2.4.9 ,Window 7 and Visual Studio 12 2013 I used cmake to create a opencv.sln by following the tutorials. When I open the project to build the solution 'OpenCV', it shows there are 55 errors. A lot of errors are like : Error LNK1181: cannot open file '....\lib\Release\opencv_core2411.lib Error LNK1181: cannot open file '....\lib\Release\opencv_gpu2411.lib and so on. And some other error messages are : error MSB6006: "cmd.exe" exited with code 1 I have tried to use win32 and x64 to compile but the error messages are both happened. Please tell how to solve the problem?

edit retag flag offensive close merge delete



Why are you using 2.4.9?. You'd better use a newer version, at least 2.4.11/2.4.12 or 3.0.0.

LorenaGdL gravatar imageLorenaGdL ( 2015-12-03 01:06:22 -0500 )edit

I tried OpenCV 2.4.11,the problem still happend

yyyaoyyyao gravatar imageyyyaoyyyao ( 2015-12-03 01:07:46 -0500 )edit

Remove every previous version files and try again. Also, make sure you're building and not running when using Visual Studio

LorenaGdL gravatar imageLorenaGdL ( 2015-12-03 01:10:12 -0500 )edit

I removed OpenCV 2.4.9 , built again and met the same situation

yyyaoyyyao gravatar imageyyyaoyyyao ( 2015-12-03 01:26:01 -0500 )edit

As I told you, are you sure you're building the solution and not trying to run it? The error "error MSB6006: "cmd.exe" exited with code 1" seems to indicate that you're just pushing the green start button

LorenaGdL gravatar imageLorenaGdL ( 2015-12-03 01:36:21 -0500 )edit

right click "Solution 'OpenCV'(72 projects) " in the Solution Explorer and click build Solution

yyyaoyyyao gravatar imageyyyaoyyyao ( 2015-12-03 01:42:06 -0500 )edit

Weird... I'd recommend you to get the latest version (2.4.12 is you want to stick with 2.4 version) from the Github repo and build from it:

LorenaGdL gravatar imageLorenaGdL ( 2015-12-03 01:48:51 -0500 )edit

I will try,thank you for your recommendation

yyyaoyyyao gravatar imageyyyaoyyyao ( 2015-12-03 01:50:33 -0500 )edit

Try to build "ALL_BUILD" project. BTW often a Cmake > File > Delete Cache will help. In case you could delete the Build folder at all and restart from scratch

pklab gravatar imagepklab ( 2015-12-03 03:16:57 -0500 )edit

In fact, I have tried to build " ALL_BUILD" before. The error messages are the same with build solution project. And I have created openCV project for several times with build folder deleted and cache cleaned

yyyaoyyyao gravatar imageyyyaoyyyao ( 2015-12-03 03:43:05 -0500 )edit