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

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

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

Comments

1

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 -0600 )edit

I tried OpenCV 2.4.11,the problem still happend

yyyaoyyyao gravatar imageyyyaoyyyao ( 2015-12-03 01:07:46 -0600 )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 -0600 )edit

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

yyyaoyyyao gravatar imageyyyaoyyyao ( 2015-12-03 01:26:01 -0600 )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 -0600 )edit

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

yyyaoyyyao gravatar imageyyyaoyyyao ( 2015-12-03 01:42:06 -0600 )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: https://github.com/Itseez/opencv/tree...

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

I will try,thank you for your recommendation

yyyaoyyyao gravatar imageyyyaoyyyao ( 2015-12-03 01:50:33 -0600 )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 -0600 )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 -0600 )edit