Forum Discussion
Altera_Forum
Honored Contributor
19 years ago --- Quote Start --- originally posted by leewood@Aug 1 2006, 04:52 AM hi,
i compiled the kernel with application w3cam (kernel/library/defaul tselection->customize vendor /user settings->miscellaneous applications->video tool->vidcat).i have selected building libz,libpng and libjpeg which was needed by w3cam,and they hve been builded successful.
the error as follow:
.........................
make[2]: entering directory `/home/leewood/uclinux-dist-test/user/w3cam'
nios2-linux-uclibc-gcc -os -g -dlinux -d__linux__ -dunix -d__uclinux__ -dembed -i/home/leewood/uclinux-dist-test -fno-builtin -dhave_libm=1 -dhave_libz=1 -dhave_libpng=1 -dhave_libjpeg=1 -dvideo_dev=\"/dev/video\" -dversion=\"0.7.2\" -c -o w3cam.o w3cam.c
w3cam.c:41:18: zlib.h: no such file or directory
w3cam.c:44:17: png.h: no such file or directory
w3cam.c:47:21: jpeglib.h: no such file or directory
w3cam.c: in function `put_image_jpeg':
w3cam.c:297: error: `jsamprow' undeclared (first use in this function)
w3cam.c:297: error: (each undeclared identifier is reported only once
w3cam.c:297: error: for each function it appears in.)
w3cam.c:297: error: syntax error before "row_ptr"
w3cam.c:298: error: storage size of 'cjpeg' isn't known
w3cam.c:299: error: storage size of 'jerr' isn't known
w3cam.c:316: error: `jcs_rgb' undeclared (first use in this function)
w3cam.c:319: error: `jcs_grayscale' undeclared (first use in this function)
w3cam.c:325: error: `jdct_fastest' undeclared (first use in this function)
w3cam.c:331: error: `row_ptr' undeclared (first use in this function)
w3cam.c: in function `put_image_png':
w3cam.c:363: error: `png_infop' undeclared (first use in this function)
w3cam.c:363: error: syntax error before "info_ptr"
w3cam.c:364: error: `png_structp' undeclared (first use in this function)
w3cam.c:366: error: `png_ptr' undeclared (first use in this function)
w3cam.c:368: error: `info_ptr' undeclared (first use in this function)
w3cam.c:375: error: `png_color_type_rgb' undeclared (first use in this function)
w3cam.c:375: error: `png_interlace_none' undeclared (first use in this function)
w3cam.c:376: error: `png_compression_type_default' undeclared (first use in this function)
w3cam.c:376: error: `png_filter_type_default' undeclared (first use in this function)
w3cam.c:380: error: `png_color_type_gray' undeclared (first use in this function)
make[2]: *** [w3cam.o] 错误 1
make[2]: leaving directory `/home/leewood/uclinux-dist-test/user/w3cam'
make[1]: *** [all] 错误 2
make[1]: leaving directory `/home/leewood/uclinux-dist-test/user'
make: *** [subdirs] 错误 1
[leewood@localhost uclinux-dist-test]$
i think error message
".........
w3cam.c:41:18: zlib.h: no such file or directory
w3cam.c:44:17: png.h: no such file or directory
w3cam.c:47:21: jpeglib.h: no such file or directory"
is because that * .h files location is incorrectly setted in configure.in.i am confused with compiling and linking on linux.so i do not know what to do .
pls help,thanks!
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=17311)
--- quote end ---
--- Quote End --- Hi leewood, Include dir path in not set while compiling w3cam.c, You have add INCLUDE path of dir where all *.h files are present, you can do it by adding your path in local dir Makefile, where w3cam.c is present. <div class='quotetop'>QUOTE </div> --- Quote Start --- nios2-linux-uclibc-gcc -Os -g -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -I/home/leewood/uClinux-dist-test -fno-builtin -DHAVE_LIBM=1 -DHAVE_LIBZ=1 -DHAVE_LIBPNG=1 -DHAVE_LIBJPEG=1 -DVIDEO_DEV=\"/dev/video\" -DVERSION=\"0.7.2\" -c -o w3cam.o w3cam.c[/b] --- Quote End --- Also check, "-I" is the option in your gcc include flag, current path is only -I/home/leewood/uClinux-dist-test Just run a search in you source code and find where all required *.h files are present. Then add respective path in you Makefile or add flag options for individual *.c file where ever required. thanks, Ankur