首先我在我的linux 2.4里面装了jpeg库
过程如下:
./configure --prefix=/usr/local/arm/3.4.1/arm-linux --host=arm-linux --enable-shared --enable-static;
修改Makefile:
CC= /hao/toolchain/arm-linux/bin/arm-linux-gcc
AR= /hao/toolchain/arm-linux/bin/arm-linux-ar rc
AR2= /hao/toolchain/arm-linux/bin/arm-linux-ranlib
make
make install
装好了过后我可以编译运行v4l的应用程序可以在板子上面采集视频;
我的qtopia-core 4.2.2的安装也选择了(-system-libjpeg);
我在编译程序的步骤如下:
1。qmake -project
在生成的pro文件里面加入了
LIBS += -L/usr/local/arm/3.4.1/ arm-linux/lib -ljpeg
2。qmake
3。make
然后出错如下:
arm-linux-g++ -Wl,-rpath,/usr/local/Trolltech/QtopiaCore-4.2.2-arm/lib -o a a.o main.o moc_a.o -L/usr/local/Trolltech/QtopiaCore-4.2.2-arm/lib -ljpeg -L/usr/local/arm/3.4.1/arm-linux/lib -lQtGui -L/tmp/qtopia-core-opensource-src-4.2.2/lib -lQtNetwork -lQtCore -lm -ldl -lpthread
a.o(.text+0xe00): In function `put_image_jpeg(_IO_FILE*, unsigned char*, int, int, int, int)':
: undefined reference to `jpeg_std_error(jpeg_error_mgr*)'
a.o(.text+0xe18): In function `put_image_jpeg(_IO_FILE*, unsigned char*, int, int, int, int)':
: undefined reference to `jpeg_CreateCompress(jpeg_compress_struct*, int, unsigned int)'
a.o(.text+0xe44): In function `put_image_jpeg(_IO_FILE*, unsigned char*, int, int, int, int)':
: undefined reference to `jpeg_set_defaults(jpeg_compress_struct*)'
a.o(.text+0xe54): In function `put_image_jpeg(_IO_FILE*, unsigned char*, int, int, int, int)':
: undefined reference to `jpeg_set_quality(jpeg_compress_struct*, int, int)'
a.o(.text+0xe68): In function `put_image_jpeg(_IO_FILE*, unsigned char*, int, int, int, int)':
: undefined reference to `jpeg_stdio_dest(jpeg_compress_struct*, _IO_FILE*)'
a.o(.text+0xe74): In function `put_image_jpeg(_IO_FILE*, unsigned char*, int, int, int, int)':
: undefined reference to `jpeg_start_compress(jpeg_compress_struct*, int)'
a.o(.text+0xedc): In function `put_image_jpeg(_IO_FILE*, unsigned char*, int, int, int, int)':
: undefined reference to `jpeg_write_scanlines(jpeg_compress_struct*, unsigned char**, unsigned int)'
a.o(.text+0xef0): In function `put_image_jpeg(_IO_FILE*, unsigned char*, int, int, int, int)':
: undefined reference to `jpeg_finish_compress(jpeg_compress_struct*)'
a.o(.text+0xef8): In function `put_image_jpeg(_IO_FILE*, unsigned char*, int, int, int, int)':
: undefined reference to `jpeg_destroy_compress(jpeg_compress_struct*)'
a.o(.text+0xf48): In function `put_image_jpeg(_IO_FILE*, unsigned 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: *** [a] Error 1
不知道那个步骤出错了,希望大家给我指点一下,在这里已经瞎忙了好长时间了!!!