Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: undefined reference to Load3DS(and)Bitmap

  1. #1
    Junior Member Newbie
    Join Date
    May 2004
    Location
    australia
    Posts
    7

    undefined reference to Load3DS(and)Bitmap

    Hi,

    I am on linux - trying to learn opengl.

    I am doing the spacesimulator.net tutorials.
    The downloaded versions of the code work. I run the make file as normal BUT.. when I try using the exact same code with a different 3ds or Bitmap I get the following error:

    In function 'init()'
    undefined reference to Load3DS (obj_type*, char*)
    In function 'init()'
    undefined reference to LoadBitmap(char*)
    collect2:ld returned 1 exit status.

    Does anyone know why?

    I have changed the references to the former files correctly.

    ????

    Help appreciated.

    Adhara

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,651

    Re: undefined reference to Load3DS(and)Bitmap

    Hi !

    There can be two reasons.

    You have not included that functions object file or library when you link the application.

    Or, if C++ is used (without extern "C" and so on) the arguments must match 100% or else the function will not be found, in C make sure the prototype (if you have one) match the definition of the function.

    So you just have to make sure that you do include the functions definition and that the declaration/prototype match the definition.

    If you do, then the error message will go away.

    Mikael

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •