Ask Your Question
0

Opencv 2.4.3 can not find some Macro such as MAX_PATH in stdio.h

asked 2012-11-08 21:47:32 -0500

wsc36305 gravatar image

I update my Opencv 2.4.2 to Opencv 2.4.3 , some of my programs works well with opencv2.4.2 ,but they could not run with opencv2.4.3. It shows that it could not find some Macros such as MAX_PATH M_PI and,I am sure that I add corret corresponding head file,How could I solve these problems?

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2012-11-08 23:58:50 -0500

If I understand right, you use Windows and Visual Studio. Add the following includes at the beginning of source code:

#include <windows.h>
#define _USE_MATH_DEFINES
#include <math.h>
edit flag offensive delete link more

Comments

Yes,I use Windows 7 and Visual Studio 2010.I do as you said,it works.Thank you very much.And could you explain that why these needed in opencv2.4.3 and opencv2.4.2 does't.

wsc36305 gravatar imagewsc36305 ( 2012-11-09 02:23:43 -0500 )edit
0

answered 2012-11-12 05:30:49 -0500

In 2.4.3 all platform specific includes were removed from OpenCV headers.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2012-11-08 21:47:32 -0500

Seen: 222 times

Last updated: Nov 12 '12