Menu

[Newbie] Opengl Extension linker problem

Vinn
2007-11-27
2012-09-26
  • Vinn

    Vinn - 2007-11-27

    hi ,

    i've got a problem compiling my code:

    when i try to compile my code the linker gives me this error:

    [Linker error] undefined reference to glGenFramebuffersEXT' [Linker error] undefined reference toglBindFramebufferEXT'
    [Linker error] undefined reference to `glFramebufferTexture2DEXT'

    i'm using SDL , OpenGl and DevIL libs:

    my linking options are:
    -lmingw32 -lopengl32 -lglu32 -lSDLmain -lSDL -ldevil -lilu -lilut

    Thanks in advance for any kind of help.

    P.S. my VGA supports that almost all ARB, EXT and NV estension.

     
    • Vinn

      Vinn - 2007-11-30

      really thanks BiT,you save my day!!!

      i've my code now compile and works ^^

      i've also found this C example form an opengl article:
      http://www.opengl.org/resources/features/OGLextensions/pointburst.c

      hope that is useful for someone else!

      thanks again to all of your help !!

       
    • Anonymous

      Anonymous - 2007-11-27

      No! Post the Compile Log. That will accurately tell us what your errors are and what compiler/linker options you have set. Its a simple copy & paste so it is easier to provide full and accurate information than it is to do what you did!

      Clifford

       
    • Vinn

      Vinn - 2007-11-27

      thanks for the reply cifford

      Compile Log:

      Compilatore: Default compiler
      Building Makefile: "C:#######\Desktop\Test\Makefile.win"
      Esecuzione di make...
      C:\Dev-Cpp\Bin\mingw32-make -f "C:#######\Desktop\Test\Makefile.win" all
      C:\Dev-Cpp\Bin\gcc.exe -DDEBUG -c main.c -o main.o -I"C:/Dev-Cpp/include" -DGNUWIN32 -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -g3
      C:\Dev-Cpp\Bin\gcc.exe -DDEBUG main.o objLoader.o -o "test.exe" -L"C:/Dev-Cpp/lib" -lmingw32 -lopengl32 -lglu32 -lSDLmain -lSDL -ldevil -lilu -lilut -g3

      main.o(.text+0x8fb): In function SDL_main': C:/Users/nthrack/Desktop/Test/main.c:252: undefined reference toglGenFramebuffersEXT'
      main.o(.text+0x90e):C:/Users/nthrack/Desktop/Test/main.c:253: undefined reference to glBindFramebufferEXT' main.o(.text+0x9b4):C:/Users/nthrack/Desktop/Test/main.c:259: undefined reference toglFramebufferTexture2DEXT'

      C:\Dev-Cpp\Bin\mingw32-make: *** [test.exe] Error 1

       
      • Osito

        Osito - 2007-11-27

        What's with the ####### in your path?

         
    • Vinn

      Vinn - 2007-11-27

      i don't know Osito,

      the log always gives me that problem in the path.

      anyway, i reinstalled dev-c++ and the problem in the log seems to be soved, but the linker keep generating errors :(

      Compilatore: Default compiler
      Building Makefile: "C:\Users\nthrack\Desktop\Test\Makefile.win"
      Esecuzione di make...
      C:\Dev-Cpp\Bin\mingw32-make -f "C:\Users\nthrack\Desktop\Test\Makefile.win" all
      C:\Dev-Cpp\Bin\gcc.exe -DDEBUG -c main.c -o main.o -I"C:/Dev-Cpp/include" -DGNUWIN32 -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -g3

      C:\Dev-Cpp\Bin\gcc.exe -DDEBUG main.o objLoader.o -o "test.exe" -L"C:/Dev-Cpp/lib" -lmingw32 -lopengl32 -lglu32 -lSDLmain -lSDL -ldevil -lilu -lilut -g3

      main.o(.text+0x8fb): In function SDL_main': C:/Users/nthrack/Desktop/Test/main.c:252: undefined reference toglGenFramebuffersEXT'
      main.o(.text+0x90e):C:/Users/nthrack/Desktop/Test/main.c:253: undefined reference to glBindFramebufferEXT' main.o(.text+0x9b4):C:/Users/nthrack/Desktop/Test/main.c:259: undefined reference toglFramebufferTexture2DEXT'

      C:\Dev-Cpp\Bin\mingw32-make: *** [test.exe] Error 1

      Esecuzione terminata

       
    • Vinn

      Vinn - 2007-11-28

      update:

      I've tried to compile my code under linux, and the app compile successfully.

      any idea ?

       
      • Wayne Keen

        Wayne Keen - 2007-11-28

        Out of curiosity - where did the libraries in question come from?

        Wayne

         
    • Vinn

      Vinn - 2007-11-28

      just opengl extension , i've used the lib and the headers from dev-c++(mingw) installation package.
      the other libs are SDL and DevIl.

       
      • Wayne Keen

        Wayne Keen - 2007-11-28

        I did not ask what libraries you were using, I asked where you got them from.

        For example, OpenGL (Glut) is NOT part of the default setup for Dev. Some
        headers are present, but the libraries are not. You must install Glut
        seperately, either as a Dev-Pack (which can be gotten from more than one placeO,
        or, as my getting stated with Glut guide recommends, another site / download
        process.

        Please tell me for each of the libraries, where you got them, as most do
        not come with default Dev-C++

        Wayne

         
    • Vinn

      Vinn - 2007-11-28

      for the DevIL i followed a guide on http://devpaks.org/details.php?devpak=99
      the SDL is from a Dev-Pack in the standard repository.

       
      • Wayne Keen

        Wayne Keen - 2007-11-28

        And Glut?

        Wayne

         
    • Vinn

      Vinn - 2007-11-28

      i don't use Glut

       
    • BiT

      BiT - 2007-11-29

      so you are using glext.h? which does not come with the default install of Dev and the library files probably do not have the symbols for those function calls.

      may want to look at glew.sourceforge.net

      I could be way off base so I would ask C or W or Soma to verify that.

       
    • Vinn

      Vinn - 2007-11-29

      thanks all for your replies ^^

      yes BiT i'm using an updated version of glext.h for opengl.org site.

      i've already tried to use glew libs but the result seems the same :

      Building Makefile: "C:\Users\nthrack\Desktop\Test\Makefile.win"
      Esecuzione di make...
      C:\Dev-Cpp\Bin\mingw32-make -f "C:\Users\nthrack\Desktop\Test\Makefile.win" all
      C:\Dev-Cpp\Bin\gcc.exe -DDEBUG -c main.c -o main.o -I"C:/Dev-Cpp/include" -DGNUWIN32 -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -g3

      C:\Dev-Cpp\Bin\gcc.exe -DDEBUG main.o objLoader.o -o "test.exe" -L"C:/Dev-Cpp/lib" -lmingw32 -lglu32 -lopengl32 -lglut32 -lglew32 -ldevil -lilu -lilut -lSDLmain -lSDL -lglew32 -g3

      main.o(.text+0x8ee): In function SDL_main': C:/Users/nthrack/Desktop/Test/main.c:253: undefined reference to_imp_glewGenFramebuffersEXT'
      main.o(.text+0x909):C:/Users/nthrack/Desktop/Test/main.c:254: undefined reference to _imp____glewBindFramebufferEXT' main.o(.text+0x99f):C:/Users/nthrack/Desktop/Test/main.c:261: undefined reference to_imp
      _glewFramebufferTexture2DEXT'

      C:\Dev-Cpp\Bin\mingw32-make: *** [test.exe] Error 1

      thanks again to all for your help ^^

       
    • BiT

      BiT - 2007-11-29
       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.