Forum Discussion
Altera_Forum
Honored Contributor
19 years agoHi,Ankur
I have done what you told me : ""So add CFLAGS in you make file string like below w3cam.cgi: $(OBJ) $(CC) $ (CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(LDLIBS$(LDLIBS_$@)) or change the order w3cam.cgi: $(OBJ) $(CC) $(LDFLAGS) $ (CFLAGS) -o $@ $(OBJ) $(LIBS) $(LDLIBS$(LDLIBS_$@))"" But the result is the same as last time. And I got little bit confused that the error message 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]$ " Look at the red /large chars, no matter what I have done in configure.in file about "CFLAGS"(just like "CFLAGS="$CFLAGS -I/home/leewood/uClinux-dist-test/lib/libpng -I/home/leewood/uClinux-dist-test/lib/libjpeg -I/home/leewood/uClinux-dist-test/lib/zlib") it ialways detects Include as"home/leewood/uClinux-dist-test" . So I copy all *.h file in the home/leewood/uClinux-dist-test dir ,compile about *.h succeed. But I am confused why the include dir I setted did not work. Do I get a wrong understand for setting Include dir ?And how to set it accurately? Pls give me some advice.Thank. --leewood