Ask Your Question
1

Linking OpenCV 2.4.2 with Visual Studio 2012

asked 2012-09-26 11:08:50 -0600

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

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
3

answered 2012-11-21 06:05:42 -0600

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!

edit flag offensive delete link more
2

answered 2012-09-27 00:04:10 -0600

Daniil Osokin gravatar image

updated 2012-10-01 08:55:01 -0600

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.

edit flag offensive delete link more

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 ( 2012-09-27 09:20:58 -0600 )edit

Hi Ade, Check my answer

karanjthakkar gravatar imagekaranjthakkar ( 2012-11-23 06:32:07 -0600 )edit
0

answered 2016-02-24 03:01:06 -0600

GANESH PRASAATH L gravatar image
edit flag offensive delete link more
0

answered 2012-09-26 12:13:07 -0600

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

edit flag offensive delete link more

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 ( 2012-09-27 09:17:09 -0600 )edit

Question Tools

Stats

Asked: 2012-09-26 11:08:50 -0600

Seen: 16,818 times

Last updated: Feb 24 '16