First time here? Check out the FAQ!

Ask Your Question
1

Linking OpenCV 2.4.2 with Visual Studio 2012

asked Sep 26 '12

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Hello, i'm very newbie in OpenCV and Visual Studio I am working with windows 7, 64-bit, and I used VS2012 How to configure it? I've been using the tutorial from link text but it still doesn't work.

I have written the example code, and set additional libraries but I am getting the mentioned error message: fatal error LNK1104: cannot open file 'opencv_core242.lib'

Hopefully anybody help me to solve it.

Thanks In Advance!!

Regards, Ade Nurusani

Preview: (hide)

4 answers

Sort by » oldest newest most voted
3

answered Nov 21 '12

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

I've written a blog post which might help you to use OpenCV with Visual Studio 2012: Using OpenCV 2.4.2 with Visual Studio 2012 on Windows 7 (64-bit) See if it works for you!

Preview: (hide)
2

answered Sep 27 '12

Daniil Osokin gravatar image

updated Oct 1 '12

Hi! If you install OpenCV from pre-built libs, than current version has no pre-built libs especially for Visual Studio 2012, so that can be problem (you can try, but there is no guarantee). You can use the other version of Visual Studio or build OpenCV from sources.

Furthermore, we have tutorial How to build applications with OpenCV inside the Microsoft Visual Studio. It explains, how to use OpenCV with Visual Studio, including linking step.
Also, you can check this answer.

Preview: (hide)

Comments

1

ok thanks!! So far, I haven't found tutorial opencv with Visual Studio 2012, perhaps i will try with Visual Studio 2008

Ade Nurusani gravatar imageAde Nurusani (Sep 27 '12)edit

Hi Ade, Check my answer

karanjthakkar gravatar imagekaranjthakkar (Nov 23 '12)edit
0

answered Feb 24 '16

GANESH PRASAATH L gravatar image
Preview: (hide)
0

answered Sep 26 '12

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

I propose that we should create an FAQ and display its link prominently.

Ade: Please look at the settings of Visual Studio and add the location of OpenCV library files in there. I am on VS 2008, and the place where I added this is: Tools->Options->Projects and Solutions->VC++ Directories->Library Files. If OpenCV is installed in c:/opencv, you will add two lines in there as: c:\opencv\lib\Debug c:\opencv\lib\Release

Preview: (hide)

Comments

Hmmm that's not work because in VS 2012, VC++ Directories editing in Tools> Options has been deprecated. I don't know in VS 2008, maybe i will try it

Ade Nurusani gravatar imageAde Nurusani (Sep 27 '12)edit

Question Tools

Stats

Asked: Sep 26 '12

Seen: 16,877 times

Last updated: Feb 24 '16