2012年12月26日

在Codeblocks下導入OpenCV 2.4.x

教學

1. Add the OpenCV header files directory
Open Settings → Compiler and debugger... → Search directories tab → Compiler tab
CodeBlock settings: search directory
Click add button for adding a new entry. In the popup dialog, type c:\opencv\build\include,
Add OpenCV include directory to CodeBlocks
and click Ok.

2. Add the OpenCV libraries needed for linking
Open Settings → Compiler and debugger... → Linker settings tab.
CodeBlocks linker settings
Click add for adding new entries and open a popup dialog.
CodeBlock settings: Add libraries to link
Click the "..." button to open the File Open Dialog. Go to c:\opencv\build\x86\mingw\libdirectory and select all files by pressing Ctrl-A.
Select OpenCV libraries
Click Open to add the files,
OpenCV libraries added to CodeBlocks
Click Ok to save all settings.

沒有留言:

張貼留言