开发者

installing opencv on windows(W32) to be used with code blocks

i am trying to use opencv library with code blocks(8.02).i have installed opencv2.1. when i include the headers and link the library its all fine.i have gone throug开发者_如何学编程h http://opencv.willowgarage.com/wiki/CodeBlocks tutorial as well.but when i compile the project it reports no error or warning.it just says exit with status 1.

i want to know if anyone who has used opencv with code blocks and can please help me out of this situation.

thanks!!!


I had this exact same problem a couple of weeks ago and couldn't find an answer anywhere ! After messing around with it, I found out exactly how to do it.

1) Compile the library using Cmake. http://www.cmake.org/

2) After your library is compiled you should have two different OpenCV libraries - a compiled one, and a non-compiled one.

3)In Code Blocks, click on Settings (In the File Menu). Under Settings, select Compiler and Debugger.

4)Select the Search Directories tab.Select the compiler tab under search directories. Click Add. Browse to your NON-COMPILED version of the library. In the non-compiled directory, select the include folder. Under the include folder, select OpenCV. Click OK

5)In codeblocks, select the linker tab, which is under the Search Directories tab.. Click on add and this time browse to your COMPILED version of the library. In the compiled directory, select the lib folder and click OK.

6) Go to the linker settings tab in codeblocks. Click Add. Browse to the COMPILED version of the library. In the compiled directory select lib. In the lib folder select all the libraries. Make sure to only select only the dynamic library files (.dylib extention)

7) Codeblocks is setup!

8) Run your project and it should work fine.

Feel free to ask for more help if you are still having problems.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜