Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

imwrite in different building mode(debug, release)

I am using Visual studio 2012 and opencv2.45. I have a very simple code to write the image to a file: I use imwrite("example.png", image); I build the program in Win32 console debug mode. When I link #pragma comment(lib, "opencv_highgui245D.lib"), there is no problem, the program work well. When I link #pragma comment(lib, "opencv_highgui245.lib"), the program failed. I guess the problem because I use the different library "opencv_highgui245.lib" vs "opencv_highgui245D.lib". However, a large number of other functions (including cvSaveImage), I do not have such problem no matter debug or release-mode library is used.

Any one could you tell me the problem? Thank you very much!

imwrite in different building mode(debug, release)

I am using Visual studio 2012 and opencv2.45. openCV 2.4.5.

I have a very simple code to write the image to a file: I use file:

imwrite("example.png", image);

I build the program in Win32 console debug mode.

When I link

#pragma comment(lib, "opencv_highgui245D.lib"), "opencv_highgui245D.lib")

there is no problem, problem and the program work works well.

When I link

#pragma comment(lib, "opencv_highgui245.lib"), "opencv_highgui245.lib")

the program failed. fails.

I guess the problem is because I use the different library "opencv_highgui245.lib" vs "opencv_highgui245D.lib". However, a large number of other functions (including cvSaveImage), I do not have such problem no matter debug or release-mode library is used.

Any one could you tell me the problem? problem?

Thank you very much!