bjhou2008 发表于 2012-4-18 10:08:52

编译天嵌科技光盘下的usb_camera.c问题

源代码,在天嵌科技的光盘中的“Linux资源\Linux源码包\apps_20091208.tar.bz2”压缩包中
用arm-linux-gcc 交叉编译,出现

usb_ca.c:(.text+0x910): undefined reference to `jpeg_std_error'
usb_ca.c:(.text+0x92c): undefined reference to `jpeg_CreateDecompress'
usb_ca.c:(.text+0x93c): undefined reference to `jpeg_stdio_src'
usb_ca.c:(.text+0x94c): undefined reference to `jpeg_read_header'
usb_ca.c:(.text+0x958): undefined reference to `jpeg_start_decompress'
usb_ca.c:(.text+0x998): undefined reference to `jpeg_read_scanlines'
usb_ca.c:(.text+0xb04): undefined reference to `jpeg_finish_decompress'
usb_ca.c:(.text+0xb10): undefined reference to `jpeg_destroy_decompress'
怎么解决啊?大侠们

bjhou2008 发表于 2012-4-18 10:57:48

犯了个低级错误,Makefile没有用,加上就成功编译了。
但是出现了新问题,
./usb_camera
USB Camera Test
set format failed
求解答,高手们

TQ-lkp 发表于 2012-4-18 12:02:24

用下搜索吧,这个问题我都见了不下10遍,实在没有回答的激情了

bjhou2008 发表于 2012-4-18 12:24:31

饿,找到了一个类似的,让下源码看看,我看了,没看懂啊:'(

bjhou2008 发表于 2012-4-19 11:30:44

USB Camera Test
Picture:Width = 320   Height = 240
frame buffer: 240x320,16bpp, 0x25800byte= 153600
huffman table don't exist!
Empty input file
这又是什么原因?:L

chenxao 发表于 2012-5-11 16:44:17

bjhou2008 发表于 2012-4-19 11:30 static/image/common/back.gif
USB Camera Test
Picture:Width = 320   Height = 240
frame buffer: 240x320,16bpp, 0x25800byte= 153 ...

你采集的图像可能不是jpeg格式的,看下摄像头都支持哪些格式先

reaphl 发表于 2013-1-5 11:28:14

格式错误的可以使用

struct v4l2_fmtdesc fmtdesc;
   fmtdesc.index = 0;
   fmtdesc.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
   printf("This USB camera support format:\n");
   while(ioctl(fd , VIDIOC_ENUM_FMT, &fmtdesc) != -1)
   {
      printf("\t%d.%s\n",++fmtdesc.index,fmtdesc.description);
   }
页: [1]
查看完整版本: 编译天嵌科技光盘下的usb_camera.c问题