CodeBlocks:
1. Project → Build options...
2. Linker settings 中的 Other linker options: 加入
-lhighgui -lcv -lcxcore
3. Serach directories 中的 Compiler 加入
C:\Program Files\OpenCV\cxcore\include
C:\Program Files\OpenCV\otherlibs\highgui
C:\Program Files\OpenCV\cv\include
4. Serach directories 中的 Linker 加入
C:\Program Files\OpenCV\lib
Dev-C++:
1. 在 Tools → Compiler Options → Compiler → 將 Linker Command 的框框勾起來且加
-lhighgui -lcv -lcxcore -lcvaux -lcvcam
2. Tools → Compiler Options → Directories → Libraries 加入
C:\Program Files\OpenCV\lib
3. Tools → Compiler Options → Directories → C Includes 加入
C:\Program Files\OpenCV\cxcore\include
C:\Program Files\OpenCV\cv\include
C:\Program Files\OpenCV\otherlibs\highgui
C:\Program Files\OpenCV\cvaux\include
C:\Program Files\OpenCV\otherlibs\cvcam\include
4. Tools → Compiler Options → Compiler → Directories → C++ Includes
C:\Program Files\OpenCV\cxcore\include
C:\Program Files\OpenCV\cv\include
C:\Program Files\OpenCV\otherlibs\highgui
C:\Program Files\OpenCV\cvaux\include
C:\Program Files\OpenCV\otherlibs\cvcam\include使用 CodeBlocks 每次開新專案都要重新再加入路徑
而 Dev-C++ 則不用
但是用 Dev-C++ 又不好 tracing code = =.... 真是討厭
沒有留言:
張貼留言