0

I'm working for a while with OpenCV 2.3.1 and MS Visual Studio 2010 now and have it setup on multiple PC's. In the past I've had an installation of openCV 2.1.0 on one of my PC's as well. My problem is that on the PC where I've had installed openCV 2.1.0, cxcore210.lib and cv210.lib are listed as inherited values in Linker >> Input >> Additional Dependencies

The problem is that when I try building a program on this PC with OpenCV 2.3.1 (I've setup all the linkers and stuff correctly and on my "clean" PC it is working fine) it keeps asking for these 2 lib files. Of course I can install OpenCV 2.1.0 again and link to these files but that's not really what I want since I'm working with OpenCV 2.3.1

I've tried reinstalling my Visual Studio but this doesn't solve the problem either. Also OpenCV 2.1.0 is uninstalled and Path setting are deleted as well. Does anyone know why it keeps poking around for the cxcore210.lib and cv210.lib as inherited values and how can I get rid of them?

pimmes111
  • 200
  • 4
  • 11

2 Answers2

0

That's because your project still thinks you are using OpenCV 2.1. You need to go to the project settings under Linker > Input > Additional Dependencies and replace cxcore210.lib cv210.lib by their respective v2.3.1 counterparts, which are:

opencv_core231.lib opencv_highgui231.lib

You might need to add other libraries like opencv_imgproc231.lib abd maybe others, depending on what your program is using from OpenCV. A lot of things changed between these versions.

Also, if you installed OpenCV 2.3.1 in a different directory than the one used for v2.1 you will have to adjust a few more things in the project settings:

  • The path to the headers: C/C++ > General > Additional Include Directories
  • and probably the path to the libraries: Linker > General > Additional Library Directories

This tutorial shows step by step how to configure these and much more.

Community
  • 1
  • 1
karlphillip
  • 92,053
  • 36
  • 243
  • 426
  • I fully understand your solution and know how to set all things correctly (been struggling a lot with it but Bytefish helped me out with it). The thing is that I simply can't remove cxcore210.lib and cv210.lib. When I go to Linker > Input > Additional Dependencies, these 2 libs are listed as inherited values in the grey box. I can't delete them from there – pimmes111 Apr 25 '12 at 07:17
  • I see. I don't know why that is happening, it shouldn't, so I guess you are going to have to re-create the project from scratch. Create a new VS project and start adding your files and finally adjust the project settings. I don't know another way. – karlphillip Apr 25 '12 at 12:24
  • Doesn't seem to help either. I even reinstalled Visual Studio (and because of this re-created the projects again) But these 2 lib files stay listed as inherited even after a new installation with a newly created project. I really don't fancy doing a full system recovery to fix this :p – pimmes111 Apr 25 '12 at 13:06
  • What you are saying is, if you create a new hello world project, these libs are going to be hardcoded in the project settings??? – karlphillip Apr 25 '12 at 13:08
  • Yup :p they are listed as inherited values and standing in between kernel32.lib, user32.lib and more of those files. Every new project I create these 2 lib files are somewhat inherited from somewhere. – pimmes111 Apr 25 '12 at 13:13
0

Hmmmm seems to work for now, think I managed to find somewhat of a workaround. I went to Linker > Input > Additional Dependencies and unchecked the box "Inherit from parent or project defaults". Both lib files stay listed as inherited values but at least I can properly build and run the project without getting an error telling me to point to cxcore210.lib cv210.lib

pimmes111
  • 200
  • 4
  • 11