arm용 gcc로 컴파일중 videodev.h와 videodev2.h에서 에러가 발생합니다.
arm-linux-gcc -o armvideotest test.c -I/home/jaeheon/uvcvideo/linux/include
In file included from /usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev.h:8,
from test.c:5:
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev2.h:436: error: parse error before '*' token
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev2.h:438: error: parse error before '*' token
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev2.h:439: error: parse error before '}' token
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev2.h:810: error: field `win' has incomplete type
In file included from test.c:5:
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev.h:225: error: parse error before '*' token
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev.h:226: error: conflicting types for 'clipcount'
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev2.h:437: error: previous declaration of 'clipcount' was here
/usr/lib/gcc/arm-linux/3.4.3/../../../../arm-linux/sys-include/linux/videodev.h:232: error: parse error before '}' token
make: *** [arm] 오류 1
각 행을 찾아보면 다음과 같습니다. (에러난 곳을 굵은 표시하였습니다.)
원래 프로그램 test.c에서 #include 만을 했는데도 이런 에러가 발생하니.. 막막하기만 합니다.
어떻게 해야하나요?
videodev2.h (431~439)
struct v4l2_window { struct v4l2_rect w; enum v4l2_field field; __u32 chromakey; <span> struct v4l2_clip __user *clips;</span> __u32 clipcount; <span>void __user *bitmap;</span> };
videodev2.h (804~814)
struct v4l2_format { enum v4l2_buf_type type; union { struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE <span> struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY</span> struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE __u8 raw_data[200]; // user-defined } fmt; };
videodev.h (219~232)
struct video_window { __u32 x,y; /* Position of window */ __u32 width,height; /* Its size */ __u32 chromakey; __u32 flags; <span>struct video_clip __user *clips; /* Set only */</span> <span>int clipcount;</span> #define VIDEO_WINDOW_INTERLACE 1 #define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */ #define VIDEO_CLIP_BITMAP -1 /* bitmap is 1024x625, a '1' bit represents a clipped pixel */ #define VIDEO_CLIPMAP_SIZE (128 * 625) <span>};</span>
댓글 달기