• 6517阅读
  • 4回复

急!jpeg库的问题! [复制链接]

上一主题 下一主题
离线youbug
 
只看楼主 正序阅读 楼主  发表于: 2008-05-12
— 本帖被 XChinux 执行加亮操作(2008-05-12) —
我原先在pxa255上实现了摄像头显示的程序,也就是v4l应用程序的实现
编译了一个jpeg库,
比如我编译vidcat_OK_1.c(里面有put_image_jpeg())可以象下面那样
# arm-linux-gcc  vidcat_OK_1.c  -ljpeg
编译可以下到板子里面可以显示摄像头采集的视频。
现在我做了一个qt的界面主要显示采集的视频(.jpg格式),
把vidcat_OK_1.c的函数做为slots的一部分,
但是编译的时候总是出错,


错误如下:
video.o(.text+0xe00): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_std_error(jpeg_error_mgr*)'
video.o(.text+0xe18): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_CreateCompress(jpeg_compress_struct*, int, unsigned int)'
video.o(.text+0xe44): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_set_defaults(jpeg_compress_struct*)'
video.o(.text+0xe54): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_set_quality(jpeg_compress_struct*, int, int)'
video.o(.text+0xe68): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_stdio_dest(jpeg_compress_struct*, _IO_FILE*)'
video.o(.text+0xe74): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_start_compress(jpeg_compress_struct*, int)'
video.o(.text+0xedc): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_write_scanlines(jpeg_compress_struct*, unsigned char**, unsigned int)'
video.o(.text+0xef0): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_finish_compress(jpeg_compress_struct*)'
video.o(.text+0xef8): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_destroy_compress(jpeg_compress_struct*)'
video.o(.text+0xf48): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_write_scanlines(jpeg_compress_struct*, unsigned char**, unsigned int)'
collect2: ld returned 1 exit status
make: *** [capture] Error 1

也就是我编译的时候qmake ,make 什么的不能加入 -ljpeg命令行参数啊!!
所以我把生成的makefile文件里面加入了 -ljpeg但是还是出同样的错,希望大家给我指导一下!万分感谢!
离线youbug
只看该作者 4楼 发表于: 2008-05-15
我加了-system-libjpeg
然后在#qmake -project 生成的 .pro
文件里面加入LIBS += -ljpeg -L/usr/local/arm/3.4.1/lib
还是出错啊!!求各位在给我说说!!

出错如下:

arm-linux-g++ -Wl,-rpath,/usr/local/Trolltech/QtopiaCore-4.2.2-arm/lib -o capture capture.o main.o video.o moc_video.o    -L/usr/local/Trolltech/QtopiaCore-4.2.2-arm/lib -ljpeg -L/usr/local/arm/3.4.1/lib -lQtGui -L/tmp/qtopia-core-opensource-src-4.2.2/lib -lQtNetwork -lQtCore -lm -ldl -lpthread
video.o(.text+0xe00): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_std_error(jpeg_error_mgr*)'
video.o(.text+0xe18): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_CreateCompress(jpeg_compress_struct*, int, unsigned int)'
video.o(.text+0xe44): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_set_defaults(jpeg_compress_struct*)'
video.o(.text+0xe54): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_set_quality(jpeg_compress_struct*, int, int)'
video.o(.text+0xe68): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_stdio_dest(jpeg_compress_struct*, _IO_FILE*)'
video.o(.text+0xe74): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_start_compress(jpeg_compress_struct*, int)'
video.o(.text+0xedc): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_write_scanlines(jpeg_compress_struct*, unsigned char**, unsigned int)'
video.o(.text+0xef0): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_finish_compress(jpeg_compress_struct*)'
video.o(.text+0xef8): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_destroy_compress(jpeg_compress_struct*)'
video.o(.text+0xf48): In function `put_image_jpeg(_IO_FILE*, char*, int, int, int, int)':
: undefined reference to `jpeg_write_scanlines(jpeg_compress_struct*, unsigned char**, unsigned int)'
collect2: ld returned 1 exit status
make: *** [capture] Error 1
离线youbug
只看该作者 3楼 发表于: 2008-05-13
qtopia-core
默认安装都包含那些库啊
离线youbug
只看该作者 2楼 发表于: 2008-05-13
好的谢谢,toolchain里已经有交叉编译好的jpeg库。
好像是qte编译的时候没有加-system-jpeg
离线shiroki

只看该作者 1楼 发表于: 2008-05-13
错误信息贴的不全。 看看前面编译的命令行里有-ljpeg吗?  qte库编译的时候configure加-system-jpeg选项,qte库就会自动和jpeg库链接-- 前提是你的toolchain里有交叉编译好的jpeg库。  你编译好qte库之后用ldd libqte.so看一下是不是链接上了libjpeg
--
shiro is White
ki is tree
http://www.cuteqt.com
论坛 http://www.cuteqt.com/bbs
博客 http://www.cuteqt.com/blog
博客镜像: http://sites.cuteqt.com/cuteqt
Linux/Qt/嵌入式讨论群 http://qun.qq.com/air/5699823
快速回复
限100 字节
 
上一个 下一个