Ask Your Question
5

Anyone want my notes on how to install OpenCV and a list of all errors i've gotten?

asked 2013-05-11 21:32:13 -0600

paj006@gmail.com gravatar image

Stuff you have to do to get opencv to work

Clean Install of OpenCV

install microsoft visual c++ 2010 express (express is free)
install windows SDK (7.1)
(optional but recommended) install cuda
install CMake
install opencv
open the opencvconfig.cmake file in opencv/build
in cmake, source code: e:\opencv
build the binaries: anywhere - I did e:\opencv\build64

click configure.  (specify generator?  VS2010, or vs2010 x64?)
a bunch of options (highlighted red) should appear.  Make sure 'advanced' is checked (top right) and search through the entries.  Disable the 'enable solution folders' option
if including cuda, set enable_cuda and the cuda installation dir (recommended)
click configure twice, then generate once.  close cmake.

open the new .sln file in e:\opencv\build64 ( i don't know why it asks if you want to open in vs 10 or vs2010 - they seem to do the same thing)



at the top of vs2010 click the Win32, go to configuration manager, create new platform, find Win64 in the dropdown, click ok/close
hit f7 (build project) - may take hours

Errors I've gotten

Cannot open file kernel32.lib:
The file is located in:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib
include this in your project linker settings or set path?
http://blogs.msdn.com/b/saurabh_singh/archive/2009/01/30/getting-fatal-error-lnk1181-cannot-open-input-file-kernel32-lib.aspx


nvcc : fatal error : Visual Studio configuration file '(null)' could not be found :
http://stackoverflow.com/questions/2970493/cuda-linking-error-visual-express-2008-nvcc-fatal-due-to-null-configuratio


create new project -> win32 console application.  Time to set your settings for opencv.
tools->settings->enable expert settings (so you can see the property manager)
view->property manager -> add new project property sheet.  it will appear in the solution explorer list.  right click it->properties.  use these settings (so you don't have to redo all these settings if you have to start over - you can just load an existing property sheet):
in VC++ directories, include directories: 
E:\opencv\build\include
library directories
E:\opencv\build\x64\vc10\lib

Configuration Properties does not have an option i'm looking for:
In your solution explorer you need to have the correct file/entry selected. If compiling the binaries, look for ALL_BUILD in the list?

system error - the program can't start because opencv_corexxx is missing from your computer -
include path in env variables, restart computer

unresolved external symbol __imp_EncodePointer
need to include files from the SDK.  In properties->linker->general->include additional folders put:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64

1>opencv_core243d.lib(opencv_core243d.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
change the Win32 at the top of vs2010 to x64

ConfigurationGeneral not found
http://support.microsoft.com/kb/2519277?wa=wsignin1.0  bug when you upgrade to a SP1 - x64 compilers are removed.  



"encountered an unknown error and has to close"
"Microsoft VC Express has stopped working"
reinstall windows.  seriously.  Reinstalling Everything else does NOT work.  Only reinstalling windows works.
Event viewer (administration tools) should have more details, somewhere in ...
(more)
edit retag flag offensive close merge delete

Comments

oh dear, what a story .. :)

berak gravatar imageberak ( 2013-05-12 16:01:52 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-05-12 00:36:06 -0600

Double Vision gravatar image

Very Helpful! Thanks for posting.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-05-11 21:32:13 -0600

Seen: 3,056 times

Last updated: May 11 '13