>

2014년 4월 21일 월요일

OpenCV Debug version; CMAKE_BUILD_TYPE=RelWithDebInfo

Reply | Threaded | More    

Re: how to build a debug version opencv lib

Michal Kottman
42 posts
On 8 December 2010 03:37, [hidden email] <[hidden email]> wrote:
> hi,everyone .I need a debug version lib of opencv,but I can't get a debug version with cmake on unbutu.Would you show me how to build a debug version lib in detail?thanks.


Very easy, just run cmake-gui in your build directory, and change
CMAKE_BUILD_TYPE to "Debug". Then press Configure, then Generate and
then run make - the result should be compiled as debug. Or when
running from command line:

opencv\build$ cmake -DCMAKE_BUILD_TYPE=Debug ../opencv

What I found useful is setting CMAKE_BUILD_TYPE to "RelWithDebInfo" -
it will be beuilt as release with all optimizations, but still have
debug info embedded - very useful, because it is fast, and you still
have the debug info when something crashes inside the OpenCV library. 

댓글 없음:

댓글 쓰기