how to build a debug version opencv lib

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to build a debug version opencv lib

lidiping@yahoo.cn
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.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to build a debug version opencv lib

Michal Kottman
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to build a debug version opencv lib

lidiping@yahoo.cn


--- In [hidden email], Michal Kottman <k0mpjut0r@...> wrote:

>
> On 8 December 2010 03:37, lidiping@... <lidiping@...> 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.
>
Your help was greatly appreciated.It works well,thanks one billion.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to build a debug version opencv lib

cvcalderonf
In reply to this post by Michal Kottman
Works great, in codeblocks too ,

 thanks.



--- In [hidden email], Michal Kottman <k0mpjut0r@...> wrote:

>
> On 8 December 2010 03:37, lidiping@... <lidiping@...> 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.
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to build a debug version opencv lib

payman_kh
This post has NOT been accepted by the mailing list yet.
May I know how you got it working in code::blocks?
are you using windows?
Loading...