Skip to main content

Thread: after updates, cant compile OpenGL project :(


i copied current code laptop, overwriting previous code, had binary compiled previous (pre updates)

new code, type make, , undefined reference to..... every glfucntion call in program. errors not indicate libgl.so.1 not found. however, notice in wierd place /usr/lib/i386-linux-gnu/mesa???

, libglu.so.1 in /usr/lib/i386-linux-gnu

pretty these libs in /usr/lib previously

gives?
code:
gcc -wall  -o spearfall -lgl -lglu -lm `sdl-config --cflags --libs` main.c drawprims.c textures.c maps.c wfobj.c datafile.c drawing.c movement.c main.c: in function ‘main’: main.c:52:17: warning: unused variable ‘obj_tree’ [-wunused-variable] main.c:51:30: warning: variable ‘rightmouseb’ set not used [-wunused-but-set-variable] drawprims.c: in function ‘drawhgrid’: drawprims.c:71:7: warning: variable ‘sl’ set not used [-wunused-but-set-variable] drawprims.c: in function ‘drawplayericon’: drawprims.c:90:7: warning: variable ‘pos’ set not used [-wunused-but-set-variable] datafile.c: in function ‘loadsettings’: datafile.c:16:8: warning: variable ‘lsize’ set not used [-wunused-but-set-variable] datafile.c:12:7: warning: variable ‘i’ set not used [-wunused-but-set-variable] datafile.c: in function ‘getmap’: datafile.c:134:8: warning: unused variable ‘str’ [-wunused-variable] datafile.c: in function ‘getmap2’: datafile.c:123:8: warning: ‘y’ may used uninitialized in function [-wuninitialized] movement.c: in function ‘wallcheck’: movement.c:15:13: warning: ‘loc’ may used uninitialized in function [-wuninitialized] /tmp/cc70jvhr.o: in function `main': main.c:(.text+0x112): undefined reference `sdl_init' main.c:(.text+0x11b): undefined reference `sdl_geterror' main.c:(.text+0x147): undefined reference `sdl_getvideoinfo' main.c:(.text+0x157): undefined reference `sdl_geterror' main.c:(.text+0x1d6): undefined reference `sdl_gl_setattribute' main.c:(.text+0x200): undefined reference `sdl_setvideomode' main.c:(.text+0x213): undefined reference `sdl_geterror' main.c:(.text+0x24e): undefined reference `sdl_enablekeyrepeat' main.c:(.text+0x257): undefined reference `sdl_geterror' main.c:(.text+0x3ad): undefined reference `sdl_setvideomode' main.c:(.text+0x3c0): undefined reference `sdl_geterror' main.c:(.text+0x491): undefined reference `sdl_pollevent' /tmp/cc70jvhr.o: in function `handlekeypress': main.c:(.text+0x5c9): undefined reference `sdl_wm_togglefullscreen' main.c:(.text+0x634): undefined reference `sin' main.c:(.text+0x68e): undefined reference `cos' main.c:(.text+0x71d): undefined reference `sin' main.c:(.text+0x754): undefined reference `sin' main.c:(.text+0x7ae): undefined reference `cos' main.c:(.text+0x834): undefined reference `sin' /tmp/cc70jvhr.o: in function `quit': main.c:(.text+0x89b): undefined reference `sdl_quit' /tmp/cc70jvhr.o: in function `resizewindow': main.c:(.text+0x8e6): undefined reference `glviewport' main.c:(.text+0x8f2): undefined reference `glmatrixmode' main.c:(.text+0x8f7): undefined reference `glloadidentity' main.c:(.text+0x920): undefined reference `gluperspective' main.c:(.text+0x92c): undefined reference `glmatrixmode' main.c:(.text+0x931): undefined reference `glloadidentity' /tmp/cczv0xxo.o: in function `drawhface': drawprims.c:(.text+0x1a): undefined reference `glbegin' drawprims.c:(.text+0x39): undefined reference `glnormal3f' drawprims.c:(.text+0x4f): undefined reference `gltexcoord2f' drawprims.c:(.text+0x70): undefined reference `glvertex3f' drawprims.c:(.text+0x86): undefined reference `gltexcoord2f' drawprims.c:(.text+0xac): undefined reference `glvertex3f' drawprims.c:(.text+0xc2): undefined reference `gltexcoord2f' drawprims.c:(.text+0xed): undefined reference `glvertex3f' drawprims.c:(.text+0x103): undefined reference `gltexcoord2f' drawprims.c:(.text+0x129): undefined reference `glvertex3f' drawprims.c:(.text+0x12e): undefined reference `glend' /tmp/cczv0xxo.o: in function `drawcubeblock': drawprims.c:(.text+0x161): undefined reference `glbegin' drawprims.c:(.text+0x177): undefined reference `gltexcoord2f' drawprims.c:(.text+0x198): undefined reference `glvertex3f' drawprims.c:(.text+0x1ae): undefined reference `gltexcoord2f' drawprims.c:(.text+0x1d2): undefined reference `glvertex3f' drawprims.c:(.text+0x1e8): undefined reference `gltexcoord2f' drawprims.c:(.text+0x20f): undefined reference `glvertex3f' drawprims.c:(.text+0x225): undefined reference `gltexcoord2f' drawprims.c:(.text+0x249): undefined reference `glvertex3f' drawprims.c:(.text+0x25f): undefined reference `gltexcoord2f' drawprims.c:(.text+0x280): undefined reference `glvertex3f' drawprims.c:(.text+0x296): undefined reference `gltexcoord2f' drawprims.c:(.text+0x2ba): undefined reference `glvertex3f' drawprims.c:(.text+0x2d0): undefined reference `gltexcoord2f' drawprims.c:(.text+0x2f7): undefined reference `glvertex3f' drawprims.c:(.text+0x30d): undefined reference `gltexcoord2f' drawprims.c:(.text+0x331): undefined reference `glvertex3f' drawprims.c:(.text+0x347): undefined reference `gltexcoord2f' drawprims.c:(.text+0x36b): undefined reference `glvertex3f' drawprims.c:(.text+0x381): undefined reference `gltexcoord2f' drawprims.c:(.text+0x3a8): undefined reference `glvertex3f' drawprims.c:(.text+0x3be): undefined reference `gltexcoord2f' drawprims.c:(.text+0x3e8): undefined reference `glvertex3f' drawprims.c:(.text+0x3fe): undefined reference `gltexcoord2f' drawprims.c:(.text+0x425): undefined reference `glvertex3f' drawprims.c:(.text+0x43b): undefined reference `gltexcoord2f' drawprims.c:(.text+0x45f): undefined reference `glvertex3f' drawprims.c:(.text+0x475): undefined reference `gltexcoord2f' drawprims.c:(.text+0x49c): undefined reference `glvertex3f' drawprims.c:(.text+0x4b2): undefined reference `gltexcoord2f' drawprims.c:(.text+0x4dc): undefined reference `glvertex3f' drawprims.c:(.text+0x4f2): undefined reference `gltexcoord2f' drawprims.c:(.text+0x519): undefined reference `glvertex3f' drawprims.c:(.text+0x51e): undefined reference `glend' /tmp/cczv0xxo.o: in function `drawhgrid': drawprims.c:(.text+0x5bc): undefined reference `glbegin' drawprims.c:(.text+0x5ff): undefined reference `gltexcoord2f' drawprims.c:(.text+0x618): undefined reference `glvertex3f' drawprims.c:(.text+0x62e): undefined reference `gltexcoord2f' drawprims.c:(.text+0x64b): undefined reference `glvertex3f' drawprims.c:(.text+0x661): undefined reference `gltexcoord2f' drawprims.c:(.text+0x684): undefined reference `glvertex3f' drawprims.c:(.text+0x69a): undefined reference `gltexcoord2f' drawprims.c:(.text+0x6b7): undefined reference `glvertex3f' drawprims.c:(.text+0x6ca): undefined reference `glend' /tmp/cczv0xxo.o: in function `drawplayericon': drawprims.c:(.text+0x706): undefined reference `glcolor3f' drawprims.c:(.text+0x712): undefined reference `glbegin' drawprims.c:(.text+0x728): undefined reference `gltexcoord2f' drawprims.c:(.text+0x747): undefined reference `glvertex3f' drawprims.c:(.text+0x75d): undefined reference `gltexcoord2f' drawprims.c:(.text+0x77c): undefined reference `glvertex3f' drawprims.c:(.text+0x792): undefined reference `gltexcoord2f' drawprims.c:(.text+0x7b1): undefined reference `glvertex3f' drawprims.c:(.text+0x7c7): undefined reference `gltexcoord2f' drawprims.c:(.text+0x7e6): undefined reference `glvertex3f' drawprims.c:(.text+0x7eb): undefined reference `glend' /tmp/cczv0xxo.o: in function `glblitonscreen': drawprims.c:(.text+0x7ff): undefined reference `glmatrixmode' drawprims.c:(.text+0x804): undefined reference `glpushmatrix' drawprims.c:(.text+0x809): undefined reference `glloadidentity' drawprims.c:(.text+0x815): undefined reference `glmatrixmode' drawprims.c:(.text+0x81a): undefined reference `glpushmatrix' drawprims.c:(.text+0x81f): undefined reference `glloadidentity' drawprims.c:(.text+0x832): undefined reference `glbindtexture' drawprims.c:(.text+0x851): undefined reference `glcolor3f' drawprims.c:(.text+0x85d): undefined reference `glbegin' drawprims.c:(.text+0x871): undefined reference `gltexcoord2i' drawprims.c:(.text+0x890): undefined reference `glvertex3f' drawprims.c:(.text+0x8a4): undefined reference `gltexcoord2i' drawprims.c:(.text+0x8c3): undefined reference `glvertex3f' drawprims.c:(.text+0x8d7): undefined reference `gltexcoord2i' drawprims.c:(.text+0x8f6): undefined reference `glvertex3f' drawprims.c:(.text+0x90a): undefined reference `gltexcoord2i' drawprims.c:(.text+0x929): undefined reference `glvertex3f' drawprims.c:(.text+0x92e): undefined reference `glend' drawprims.c:(.text+0x933): undefined reference `glpopmatrix' drawprims.c:(.text+0x93f): undefined reference `glmatrixmode' drawprims.c:(.text+0x944): undefined reference `glpopmatrix' drawprims.c:(.text+0x950): undefined reference `glmatrixmode' /tmp/cczv0xxo.o: in function `drawuprightprop': drawprims.c:(.text+0xa0c): undefined reference `glbegin' drawprims.c:(.text+0xa22): undefined reference `gltexcoord2f' drawprims.c:(.text+0xa58): undefined reference `glvertex3f' drawprims.c:(.text+0xa6e): undefined reference `gltexcoord2f' drawprims.c:(.text+0xaa7): undefined reference `glvertex3f' drawprims.c:(.text+0xabd): undefined reference `gltexcoord2f' drawprims.c:(.text+0xaf9): undefined reference `glvertex3f' drawprims.c:(.text+0xb0f): undefined reference `gltexcoord2f' drawprims.c:(.text+0xb48): undefined reference `glvertex3f' drawprims.c:(.text+0xb4d): undefined reference `glend' /tmp/cczv0xxo.o: in function `drawsimpletree': drawprims.c:(.text+0xb83): undefined reference `glbegin' drawprims.c:(.text+0xb99): undefined reference `gltexcoord2f' drawprims.c:(.text+0xbba): undefined reference `glvertex3f' drawprims.c:(.text+0xbd0): undefined reference `gltexcoord2f' drawprims.c:(.text+0xbf4): undefined reference `glvertex3f' drawprims.c:(.text+0xc0a): undefined reference `gltexcoord2f' drawprims.c:(.text+0xc31): undefined reference `glvertex3f' drawprims.c:(.text+0xc47): undefined reference `gltexcoord2f' drawprims.c:(.text+0xc6b): undefined reference `glvertex3f' drawprims.c:(.text+0xc81): undefined reference `gltexcoord2f' drawprims.c:(.text+0xca2): undefined reference `glvertex3f' drawprims.c:(.text+0xcb8): undefined reference `gltexcoord2f' drawprims.c:(.text+0xcdc): undefined reference `glvertex3f' drawprims.c:(.text+0xcf2): undefined reference `gltexcoord2f' drawprims.c:(.text+0xd19): undefined reference `glvertex3f' drawprims.c:(.text+0xd2f): undefined reference `gltexcoord2f' drawprims.c:(.text+0xd53): undefined reference `glvertex3f' drawprims.c:(.text+0xd69): undefined reference `gltexcoord2f' drawprims.c:(.text+0xd8d): undefined reference `glvertex3f' drawprims.c:(.text+0xda3): undefined reference `gltexcoord2f' drawprims.c:(.text+0xdca): undefined reference `glvertex3f' drawprims.c:(.text+0xde0): undefined reference `gltexcoord2f' drawprims.c:(.text+0xe0a): undefined reference `glvertex3f' drawprims.c:(.text+0xe20): undefined reference `gltexcoord2f' drawprims.c:(.text+0xe47): undefined reference `glvertex3f' drawprims.c:(.text+0xe5d): undefined reference `gltexcoord2f' drawprims.c:(.text+0xe81): undefined reference `glvertex3f' drawprims.c:(.text+0xe97): undefined reference `gltexcoord2f' drawprims.c:(.text+0xebe): undefined reference `glvertex3f' drawprims.c:(.text+0xed4): undefined reference `gltexcoord2f' drawprims.c:(.text+0xefe): undefined reference `glvertex3f' drawprims.c:(.text+0xf14): undefined reference `gltexcoord2f' drawprims.c:(.text+0xf3b): undefined reference `glvertex3f' drawprims.c:(.text+0xf40): undefined reference `glend' /tmp/ccvoywed.o: in function `loadgltextures': textures.c:(.text+0x19d): undefined reference `glgentextures' textures.c:(.text+0x217): undefined reference `sdl_rwfromfile' textures.c:(.text+0x227): undefined reference `sdl_loadbmp_rw' textures.c:(.text+0x255): undefined reference `glbindtexture' textures.c:(.text+0x271): undefined reference `gltexparameteri' textures.c:(.text+0x2c3): undefined reference `glteximage2d' textures.c:(.text+0x322): undefined reference `sdl_freesurface' /tmp/ccjcpn6b.o: in function `tilebychar': maps.c:(.text+0x1e): undefined reference `glbindtexture' maps.c:(.text+0x3d): undefined reference `glnormal3f' maps.c:(.text+0x53): undefined reference `gltexcoord2f' maps.c:(.text+0x73): undefined reference `glbindtexture' maps.c:(.text+0x7f): undefined reference `glbegin' maps.c:(.text+0x9e): undefined reference `glcolor3f' maps.c:(.text+0xeb): undefined reference `glend' maps.c:(.text+0x10c): undefined reference `glbindtexture' maps.c:(.text+0x12b): undefined reference `glcolor3f' maps.c:(.text+0x18a): undefined reference `glbindtexture' maps.c:(.text+0x196): undefined reference `glbegin' maps.c:(.text+0x1b5): undefined reference `glcolor3f' maps.c:(.text+0x202): undefined reference `glend' maps.c:(.text+0x223): undefined reference `glbindtexture' maps.c:(.text+0x22f): undefined reference `glbegin' maps.c:(.text+0x24e): undefined reference `glcolor3f' maps.c:(.text+0x265): undefined reference `glend' maps.c:(.text+0x286): undefined reference `glbindtexture' maps.c:(.text+0x292): undefined reference `glbegin' maps.c:(.text+0x2b1): undefined reference `glcolor3f' maps.c:(.text+0x2da): undefined reference `glend' maps.c:(.text+0x2fb): undefined reference `glbindtexture' maps.c:(.text+0x31a): undefined reference `glcolor3f' maps.c:(.text+0x34d): undefined reference `glbindtexture' maps.c:(.text+0x36c): undefined reference `glcolor3f' maps.c:(.text+0x394): undefined reference `glbindtexture' maps.c:(.text+0x3cd): undefined reference `glbindtexture' /tmp/ccjcpn6b.o: in function `set_spot_light': maps.c:(.text+0x4a0): undefined reference `gllightfv' maps.c:(.text+0x4ba): undefined reference `gllightfv' maps.c:(.text+0x4d4): undefined reference `gllightfv' maps.c:(.text+0x4ee): undefined reference `gllightfv' maps.c:(.text+0x50a): undefined reference `gllightf' maps.c:(.text+0x526): undefined reference `gllightf' maps.c:(.text+0x542): undefined reference `gllightf' maps.c:(.text+0x55c): undefined reference `gllightfv' maps.c:(.text+0x56f): undefined reference `gllightmodelfv' maps.c:(.text+0x57a): undefined reference `glenable' maps.c:(.text+0x586): undefined reference `glenable' /tmp/cczu8ha1.o: in function `draw_wfobj': wfobj.c:(.text+0x424): undefined reference `glbegin' wfobj.c:(.text+0x446): undefined reference `gltexcoord2f' wfobj.c:(.text+0x4b9): undefined reference `glvertex3f' wfobj.c:(.text+0x4d0): undefined reference `glend' /tmp/ccdlkvus.o: in function `initgl': drawing.c:(.text+0x27): undefined reference `glenable' drawing.c:(.text+0x33): undefined reference `glshademodel' drawing.c:(.text+0x5b): undefined reference `glclearcolor' drawing.c:(.text+0x65): undefined reference `glcleardepth' drawing.c:(.text+0x71): undefined reference `glenable' drawing.c:(.text+0x7d): undefined reference `gldepthfunc' drawing.c:(.text+0x99): undefined reference `gllightfv' drawing.c:(.text+0xb5): undefined reference `gllightfv' drawing.c:(.text+0xd1): undefined reference `gllightfv' drawing.c:(.text+0xdd): undefined reference `glenable' drawing.c:(.text+0x118): undefined reference `glblendfunc' /tmp/ccdlkvus.o: in function `drawglscene': drawing.c:(.text+0x192): undefined reference `glclear' drawing.c:(.text+0x19e): undefined reference `glenable' drawing.c:(.text+0x1b2): undefined reference `glblendfunc' drawing.c:(.text+0x1be): undefined reference `glenable' drawing.c:(.text+0x1d1): undefined reference `glfogfv' drawing.c:(.text+0x1e6): undefined reference `glfogf' drawing.c:(.text+0x1fb): undefined reference `glfogf' drawing.c:(.text+0x210): undefined reference `glfogf' drawing.c:(.text+0x22d): undefined reference `sdl_gl_swapbuffers' drawing.c:(.text+0x24a): undefined reference `sdl_gl_swapbuffers' drawing.c:(.text+0x263): undefined reference `glloadidentity' drawing.c:(.text+0x28e): undefined reference `glrotatef' drawing.c:(.text+0x2b4): undefined reference `glrotatef' drawing.c:(.text+0x2cd): undefined reference `gltranslatef' drawing.c:(.text+0x408): undefined reference `glpushmatrix' drawing.c:(.text+0x40d): undefined reference `glloadidentity' drawing.c:(.text+0x417): undefined reference `glpopmatrix' drawing.c:(.text+0x41c): undefined reference `sdl_gl_swapbuffers' drawing.c:(.text+0x42e): undefined reference `sdl_getticks' collect2: ld returned 1 exit status make: *** [all] error 1

what? spam?


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] after updates, cant compile OpenGL project :(


Ubuntu

Comments

Popular posts from this blog

how to devide a circle into equal parts

"Could not fill because there are not enough opaque source pixels" - not solved by any other thread

Why can't I change the billing info for my account?