Re: [Plib-users] (newbie) Compile errors when installing PLIB exa mples + documentation.
Brought to you by:
sjbaker
From: Fay J. F Dr C. U. AFSEO/SK <joh...@eg...> - 2006-06-06 13:22:02
|
Otto, Please pardon my delay in answering you. From your description below, it looks a lot like you are trying to compile the "ul" library with a C program instead of with a C++ = program. The C language does not distinguish between "inline void ulEndianSwap(unsigned int *x)" and "inline void ulEndianSwap(unsigned = short *x)" while C++ does. That will cause the compiler errors you are = getting. Why the compiler is doing this with the example files is beyond me. John F. Fay Technical Fellow, Jacobs/Sverdrup TEAS Group 850-883-1294 joh...@eg... =20 -----Original Message----- From: pli...@li... [mailto:pli...@li...] On Behalf Of Otto = Halm=E9n Sent: Friday, June 02, 2006 7:44 AM To: pli...@li... Subject: [Plib-users] (newbie) Compile errors when installing PLIB = examples + documentation. It seems that I have managed to install PLIB successfully, because = although the terminal displayed strange information, all the files had been = installed in their correct locations. But now, when installing the PLIB examples + documentation package, I = get problems. Calling ./configure +++++++++++++++++++++++++++++++++++++++++++ Macintosh:/developer/plib_examples-1.8.4 ottohalmen$ ./configure = checking for a BSD-compatible install... /usr/bin/install -c checking whether = build environment is sane... yes checking for gawk... no checking for mawk... = no checking for nawk... no checking for awk... awk checking whether make = sets $(MAKE)... yes checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using = the GNU C compiler... yes checking whether gcc accepts -g... yes checking = for gcc option to accept ANSI C... none needed checking for style of = include used by make... GNU checking dependency style of gcc... gcc3 checking = how to run the C preprocessor... gcc -E checking for g++... g++ checking = whether we are using the GNU C++ compiler... yes checking whether g++ accepts = -g... yes checking dependency style of g++... gcc3 checking how to run the C++ preprocessor... g++ -E checking for a BSD-compatible install... /usr/bin/install -c checking build system type... = powerpc-apple-darwin8.6.0 checking host system type... powerpc-apple-darwin8.6.0 checking for = ulInit in -lplibul... yes checking for egrep... grep -E checking for ANSI C = header files... yes checking for sys/types.h... yes checking for sys/stat.h... = yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for = inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking = windows.h usability... no checking windows.h presence... no checking for = windows.h... no checking OpenGL/gl.h usability... yes checking OpenGL/gl.h = presence... yes checking for OpenGL/gl.h... yes checking OpenGL/glu.h usability... = yes checking OpenGL/glu.h presence... yes checking for OpenGL/glu.h... yes checking GLUT/glut.h usability... yes checking GLUT/glut.h presence... = yes checking for GLUT/glut.h... yes checking plib/ul.h usability... no = checking plib/ul.h presence... yes configure: WARNING: plib/ul.h: present but cannot be compiled configure: WARNING: plib/ul.h: check for missing prerequisite = headers? configure: WARNING: plib/ul.h: see the Autoconf documentation configure: WARNING: plib/ul.h: section "Present But Cannot Be = Compiled" configure: WARNING: plib/ul.h: proceeding with the preprocessor's = result configure: WARNING: plib/ul.h: in the future, the compiler will take precedence configure: WARNING: ## ------------------------------------------ = ## configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists. = ## configure: WARNING: ## ------------------------------------------ = ## checking for plib/ul.h... yes configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating src/js/Makefile config.status: creating src/pw/Makefile config.status: creating src/pui/Makefile config.status: creating src/sg/Makefile config.status: creating src/sl/Makefile config.status: creating src/ssg/Makefile config.status: creating src/ssg/tux/Makefile config.status: creating src/ssg/majik/Makefile config.status: creating src/ssg/load_save/Makefile config.status: creating src/ssg/state_test/Makefile config.status: creating src/ssg/tween_test/Makefile config.status: creating src/ssg/viewer/Makefile config.status: creating src/ssg/water/Makefile config.status: creating src/ssg/sky/Makefile config.status: creating src/ssg/dynamics/Makefile config.status: creating src/ssg/shrubs/Makefile config.status: creating src/fnt/Makefile config.status: creating src/net/Makefile config.status: creating src/net/client_server/Makefile config.status: creating src/net/http_get/Makefile config.status: creating src/net/net_echo/Makefile config.status: creating src/psl/Makefile config.status: creating src/util/Makefile config.status: executing depfiles commands PLIB configuration = information: Building FNT examples: yes Building JS examples: yes Building PW examples: yes Building NET examples: yes Building PUI examples: yes Building SG examples: yes Building PSL examples: yes Building SL examples: yes Building SSG/ssgAux examples: yes Building UTIL examples: yes Need GLUT: yes (found GLUT) Macintosh:/developer/plib_examples-1.8.4 ottohalmen$ +++++++++++++++++++++++++++++++++++++++++++ Something seemed to go wrong in the middle of the procedure, but it = still continued to the end. Peculiar. Anyway, now calling make: +++++++++++++++++++++++++++++++++++++++++++ Macintosh:/developer/plib_examples-1.8.4 ottohalmen$ make Making all in = src Making all in js source=3D'js_demo.cxx' object=3D'js_demo.o' = libtool=3Dno \ depfile=3D'.deps/js_demo.Po' tmpdepfile=3D'.deps/js_demo.TPo' \ depmode=3Dgcc3 /bin/sh ../../depcomp \ g++ -DPACKAGE_NAME=3D\"\" -DPACKAGE_TARNAME=3D\"\" = -DPACKAGE_VERSION=3D\"\"=20 -DPACKAGE_STRING=3D\"\" -DPACKAGE_BUGREPORT=3D\"\" = -DPACKAGE=3D\"plib_examples\"=20 -DVERSION=3D\"1.8.4\" -DSTDC_HEADERS=3D1 -DHAVE_SYS_TYPES_H=3D1 -DHAVE_SYS_STAT_H=3D1 -DHAVE_STDLIB_H=3D1 -DHAVE_STRING_H=3D1 = -DHAVE_MEMORY_H=3D1 -DHAVE_STRINGS_H=3D1 -DHAVE_INTTYPES_H=3D1 -DHAVE_STDINT_H=3D1 = -DHAVE_UNISTD_H=3D1=20 -DHAVE_OPENGL_GL_H=3D1 -DHAVE_OPENGL_GLU_H=3D1 -DGLUT_IS_PRESENT=3D1 = -I. -I. =20 -g -O2 -Wall -c -o js_demo.o `test -f 'js_demo.cxx' || echo = './'`js_demo.cxx /usr/include/plib/ul.h: In function `void ulEndianSwap(short unsigned int*)': /usr/include/plib/ul.h:342: error: declaration of C function 'void ulEndianSwap(short unsigned int*)' conflicts with /usr/include/plib/ul.h:333: error: previous declaration 'void ulEndianSwap(unsigned int*)' here /usr/include/plib/ul.h: In function `void ulEndianSwap(float*)': /usr/include/plib/ul.h:349: error: declaration of C function 'void ulEndianSwap(float*)' conflicts with /usr/include/plib/ul.h:342: error: previous declaration 'void ulEndianSwap(short unsigned int*)' here /usr/include/plib/ul.h: In function `void ulEndianSwap(float*)': /usr/include/plib/ul.h:349: error: cannot convert 'unsigned int*' to 'float*' for argument '1' to 'void ulEndianSwap(float*)' /usr/include/plib/ul.h: In function `void ulEndianSwap(int*)': /usr/include/plib/ul.h:350: error: declaration of C function 'void ulEndianSwap(int*)' conflicts with /usr/include/plib/ul.h:349: error: previous declaration 'void ulEndianSwap(float*)' here /usr/include/plib/ul.h: In function `void ulEndianSwap(float*)': /usr/include/plib/ul.h:350: error: invalid conversion from 'unsigned = int*'=20 to 'int*' /usr/include/plib/ul.h:350: error: initializing argument 1 of 'void=20 ulEndianSwap(int*)' /usr/include/plib/ul.h: In function `void ulEndianSwap(short int*)': /usr/include/plib/ul.h:351: error: declaration of C function 'void ulEndianSwap(short int*)' conflicts with /usr/include/plib/ul.h:350: error: previous declaration 'void ulEndianSwap(int*)' here /usr/include/plib/ul.h: In function `void ulEndianSwap(float*)': /usr/include/plib/ul.h:351: error: invalid conversion from 'short = unsigned int*' to 'short int*' /usr/include/plib/ul.h:351: error: initializing argument 1 of 'void=20 ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `short unsigned int ulEndianLittle16(short unsigned int)': /usr/include/plib/ul.h:358: error: invalid conversion from 'short = unsigned int*' to 'short int*' /usr/include/plib/ul.h:358: error: initializing argument 1 of 'void=20 ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `unsigned int = ulEndianLittle32(unsigned int)': /usr/include/plib/ul.h:367: error: cannot convert 'unsigned int*' to = 'short int*' for argument '1' to 'void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `float ulEndianLittleFloat(float)': /usr/include/plib/ul.h:376: error: cannot convert 'float*' to 'short = int*'=20 for argument '1' to 'void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `void ulEndianLittleArray16(short unsigned int*, int)': /usr/include/plib/ul.h:386: error: invalid conversion from 'short = unsigned int*' to 'short int*' /usr/include/plib/ul.h:386: error: initializing argument 1 of 'void=20 ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `void = ulEndianLittleArray32(unsigned int*, int)': /usr/include/plib/ul.h:396: error: cannot convert 'unsigned int*' to = 'short int*' for argument '1' to 'void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `void = ulEndianLittleArrayFloat(float*, int)': /usr/include/plib/ul.h:406: error: cannot convert 'float*' to 'short = int*'=20 for argument '1' to 'void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `void ulEndianBigArray16(short = unsigned int*, int)': /usr/include/plib/ul.h:416: error: invalid conversion from 'short = unsigned int*' to 'short int*' /usr/include/plib/ul.h:416: error: initializing argument 1 of 'void=20 ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `void ulEndianBigArray32(unsigned = int*, int)': /usr/include/plib/ul.h:426: error: cannot convert 'unsigned int*' to = 'short int*' for argument '1' to 'void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `void ulEndianBigArrayFloat(float*, int)': /usr/include/plib/ul.h:436: error: cannot convert 'float*' to 'short = int*'=20 for argument '1' to 'void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `short unsigned int = ulEndianBig16(short unsigned int)': /usr/include/plib/ul.h:445: error: invalid conversion from 'short = unsigned int*' to 'short int*' /usr/include/plib/ul.h:445: error: initializing argument 1 of 'void=20 ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `unsigned int = ulEndianBig32(unsigned int)': /usr/include/plib/ul.h:454: error: cannot convert 'unsigned int*' to = 'short int*' for argument '1' to 'void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `float ulEndianBigFloat(float)': /usr/include/plib/ul.h:463: error: cannot convert 'float*' to 'short = int*'=20 for argument '1' to 'void ulEndianSwap(short int*)' make[2]: *** [js_demo.o] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all-recursive] Error 1 Macintosh:/developer/plib_examples-1.8.4 ottohalmen$ +++++++++++++++++++++++++++++++++++++++++++ I don't know if I did something wrong or if it's the source, but it = looks like there are some errors in the source code. I don't know... As = always, my platform is MacMini G4 SD with MacOS X 10.4.6. So, will I have to edit the source files by hand (again!) or is there = an easier way? _________________________________________________________________ Uutisista turhaan tietoon. Mit=E4 ikin=E4 etsitkin, MSN Search = l=F6yt=E4=E4 hakemasi.=20 http://search.msn.fi _______________________________________________ plib-users mailing list pli...@li... https://lists.sourceforge.net/lists/listinfo/plib-users |