imwrite in different building mode(debug, release)
I am using Visual studio 2012 and openCV 2.4.5.
I have a very simple code to write the image to a file:
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 and the program works well.
When I link
#pragma comment(lib, "opencv_highgui245.lib")
the program 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?
Thank you very much!