Every time after the establishment ofopencvprojects which need to be added depends on the project library is inside the Solution Explorer right-click the project, select properties, then choose which linker input, the dependence Curry addedopencvthe lib folder in the lib file name (such as what cv210d.dll, according to need to fill out), the file name followed by a lower case letter d for the debug library, no library for the release> October 18, 2011 in the first period to prepare the sourceforge downloadopencv2.1 version of the source code files (to be under that. zip file, that can only be used for vs2008 vs2008, a bit rubbish) and then we came to cmake cmake's official website to download version 2.8.1 http://www.cmake.org/files/v2.8/cmake-2.8.1-win32- x86.exe Next, we http://www.threadingbuildingblocks .org/uploads/77 / 151/3.0/tbb30_20100406oss_win.zip here to download the intel tbb 3.0 (in fact, no less than this can be, the official website describes it is a multi-core library, full multi-core performance, opencv2.1 estimated additional support for it, anyway are intel own stuff, and put on it anyway under study, and today's multi-core cpu are basically a) so far, all the preparations have been good friends (vs2010 his first installed) cmake process next, we follow the order, first install cmake 2.8.1, and then to extract the opencv 2.1 opencv you will want to place the place, then extract the intel tbb 3.0, I will opencv and tbb folders on c: \ to open the cmake 2.8 .1, in where is the source code behind the fill (or select) opencv 2.1 installation directory, in where to build the binaries where you will have to fill out the compiled opencv 2.1 for vs2010 solution folder (eg c: \ opencv \ vs2010), then click the configure button, if you just start where to build the binaries in the directory is complete does not exist, cmake will ask you this as a new name for the folder, click "Yes" to continue, in follow-up dialog box that appears, select visual studio 10, the following option to select use default native compilers, click finish to continue after 30 seconds or so there will be a configuration window (here note that in cmake configuration when it is not able to open the vs2010) , then check build_shared_libs, build_tests, opencv_build_3dparty_libs, and the following with_jasper, with_jpeg, with_png, with_tbb (usually not the default option on this), and with_tiff options, click again after a good hook configure, after the top of the configuration window will appear tbb_include_dir words red-notfound option, here is cmake can not find intel tbb whom include files due to intel tbb 3.0 inside the include folder path (note the include, not include sub-folders inside) locate The configuration properties of the path, click again to configure, will appear at the tbb_lib_dir red line, where the library file for the intel tbb location, where you must navigate to the path location of the file containing the lib, such as the installation location is c I : \ intel tbb 3.0 \ lib \ ia32 \ vc10, that is, in the lib folder there will be sub-folder, you must navigate to the subfolder corresponding to the vc version of the folder to go here because it is configured vs2010, so we Choose vc10 folder, ia32 subfolders are 32-bit systems, where the corresponding operating system selection should be based on and then we click again to configure, then all of the red line has been changed to white, while the information below which there will be one to use tbb: yes the words, that we have intel tbb configured, then click generate, generated after the completion of a folder will appear under the vs2010 solution file opencv.slnvs2010 configuration double click to open opencv.sln after all there opencv 2.1 project, the first compilation do not worry, first click on the solution explorer inside the property manager (below the tab), expand all_build-debug | win32-Right-click microsoft.cpp.win32.user, choose properties, then select the vc + + directories in the executable directories inside the intel tbb 3.0 executable path (bin) filled to the inside, here with the lib, must be positioned to vc10 can, for example, mine is c: \ intel tbb 3.0 \ bin \ ia32 \ vc10, will include directories targeted to intel tbb without the include folder and then further in-depth orientation to the library directories in the lib fill intel tbb file location, navigate to vc10 folder, and then click OK, the options Kaqie back will compile the solution explorer mode to debug mode, right-click the solution opencv, select rebuild solution, compile and then right-click the install program, select the build, after the compilation mode to release mode, re-build the solution, and then compile the install project in your solution folder which will generate bin directory, include directory, lib directory in vs2010 in cutting back property manager, started microsoft.cpp.win32.user as above and select properties, then vc + + directories which increased opencv 2.1 executable file (bin), contains the file (include / opencv), and the library (lib), the source file (src \ cv, src \ cvaux, src \ cxcore, src \ highgui, etc.), OK, exit and save configuration changes to this opencv 2.1 did not complete the original description (important!): The author did not say actually add a global variable! such a consequence is that after running the program will prompt compiled dll file is missing in the global variable (in My Computer Properties ) to add c: \ opencv \ vs2010 \ bin and c: \ intel tbb 3.0 \ bin \ ia32 \ vc10 to Postscript: After I installed according to the above methods, the lack of a prompt to run finally called msvcr90d.dll file, Internet google a bit, is there ever vs the bug (I did not expect to resolve vs2010 did not solve the current !!!), but without prejudice to run, is always prompt very annoying, here is the msdn to find solutions way, have not had time to translate: go to "project | game properties | configuration properties | c / c + + | code generation | runtime library" and set multi-threaded debug (/ mtd) did build generated error messages ... then reset "project | game properties | configuration properties | c / c + + | code generation | runtime library "to multi-threaded debug dll (/ mdd) what it was originally, worked. if does not work, try to install vs2010 and the path where you created the project convert ntfs format partition (which move on I do not care, because all my partitions are ntfs of t_t)> (责任编辑:admin) |