Re: [Plib-users] Compile Simple from plib exampels fail
Brought to you by:
sjbaker
From: Ludwig A. <lj...@gm...> - 2011-05-13 04:13:37
|
Hello, i think you have to add some -l<lib> flags to the compilation command... -lglu -lgl -lplib i would be expecting at least. its required to link the executable against these libraries im sorry i dont know the precise library set though. On Thu, 2011-05-12 at 14:27 +0000, Sören Van Hemelrijck wrote: > Hello, > > I am new on using ubuntu with g++. Compiling a "hello world" program > works like a charm. But when I try to compile the simple.cxx from the > plib_examples-1.8.5.tar.gz (src/pui/) with the following command: > g++ -Wall simple.cxx -I /usr/include/ -o simple > > I get: > /tmp/cc8lfK1s.o: In function `motionfn(int, int)': > simple.cxx:(.text+0x14): undefined reference to `puMouse(int, int)' > simple.cxx:(.text+0x19): undefined reference to `glutPostRedisplay' > /tmp/cc8lfK1s.o: In function `mousefn(int, int, int, int)': > simple.cxx:(.text+0x41): undefined reference to `puMouse(int, int, > int, int)' > simple.cxx:(.text+0x46): undefined reference to `glutPostRedisplay' > /tmp/cc8lfK1s.o: In function `displayfn()': > simple.cxx:(.text+0x76): undefined reference to `glClearColor' > simple.cxx:(.text+0x82): undefined reference to `glClear' > simple.cxx:(.text+0x87): undefined reference to `puDisplay()' > simple.cxx:(.text+0x8c): undefined reference to `glutSwapBuffers' > simple.cxx:(.text+0x91): undefined reference to `glutPostRedisplay' > /tmp/cc8lfK1s.o: In function `main': > simple.cxx:(.text+0xe0): undefined reference to `glutInitWindowSize' > simple.cxx:(.text+0xf2): undefined reference to `glutInit' > simple.cxx:(.text+0xfe): undefined reference to `glutInitDisplayMode' > simple.cxx:(.text+0x10a): undefined reference to `glutCreateWindow' > simple.cxx:(.text+0x116): undefined reference to `glutDisplayFunc' > simple.cxx:(.text+0x122): undefined reference to `glutMouseFunc' > simple.cxx:(.text+0x12e): undefined reference to `glutMotionFunc' > simple.cxx:(.text+0x1ca): undefined reference to `glutMainLoop' > /tmp/cc8lfK1s.o: In function `puObject::setLegend(char const*)': > simple.cxx:(.text._ZN8puObject9setLegendEPKc[puObject::setLegend(char > const*)]+0x25): undefined reference to `puPostRefresh()' > /tmp/cc8lfK1s.o: In function `puButton::puButton(int, int, int, int, > int)': > simple.cxx:(.text._ZN8puButtonC2Eiiiii[puButton::puButton(int, int, > int, int, int)]+0x29): undefined reference to `puObject::puObject(int, > int, int, int)' > simple.cxx:(.text._ZN8puButtonC2Eiiiii[puButton::puButton(int, int, > int, int, int)]+0x32): undefined reference to `vtable for puButton' > /tmp/cc8lfK1s.o: In function `puOneShot::puOneShot(int, int, int, > int)': > simple.cxx:(.text._ZN9puOneShotC1Eiiii[puOneShot::puOneShot(int, int, > int, int)]+0x3a): undefined reference to `vtable for puOneShot' > /tmp/cc8lfK1s.o: In function `puGetWindowGLUT()': > simple.cxx:(.text._Z15puGetWindowGLUTv[puGetWindowGLUT()]+0x7): > undefined reference to `glutGetWindow' > /tmp/cc8lfK1s.o: In function `puSetWindowGLUT(int)': > simple.cxx:(.text._Z15puSetWindowGLUTi[puSetWindowGLUT(int)]+0xd): > undefined reference to `glutSetWindow' > /tmp/cc8lfK1s.o: In function `puGetWindowSizeGLUT(int*, int*)': > simple.cxx:(.text._Z19puGetWindowSizeGLUTPiS_[puGetWindowSizeGLUT(int*, int*)]+0xe): undefined reference to `glutGet' > simple.cxx:(.text._Z19puGetWindowSizeGLUTPiS_[puGetWindowSizeGLUT(int*, int*)]+0x1f): undefined reference to `glutGet' > /tmp/cc8lfK1s.o: In function `puSetWindowSizeGLUT(int, int)': > simple.cxx:(.text._Z19puSetWindowSizeGLUTii[puSetWindowSizeGLUT(int, > int)]+0x14): undefined reference to `glutReshapeWindow' > /tmp/cc8lfK1s.o: In function `puInitGLUT()': > simple.cxx:(.text._Z10puInitGLUTv[puInitGLUT()]+0x26): undefined > reference to `puSetWindowFuncs(int (*)(), void (*)(int), void > (*)(int*, int*), void (*)(int, int))' > simple.cxx:(.text._Z10puInitGLUTv[puInitGLUT()]+0x2b): undefined > reference to `puRealInit()' > collect2: ld returned 1 exit status > > Does someone know what I am doing wrong? I searched the archive and > other sites but didn't fined a solution. > It looks like he can't find the correct files but I included the > necessary dir. > > I am using ubuntu 10.10 with gcc version 4.4.5 (Ubuntu/Linaro > 4.4.4-14ubuntu5) > > Kind regards, > Sören > > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ plib-users mailing list pli...@li... https://lists.sourceforge.net/lists/listinfo/plib-users |