Results 1 to 5 of 5

Thread: linking problem with BloodShed

  1. #1
    Member Newbie
    Join Date
    Nov 2010
    Posts
    31

    linking problem with BloodShed

    I am having trouble compiling openGL with BloodShed. I added libraries like this Libraries
    But have this compiler errors
    Code :
      [Linker error] undefined reference to `wglSwapBuffers@4' 
      [Linker error] undefined reference to `joyReleaseCapture@4' 
      [Linker error] undefined reference to `joySetCapture@16' 
      [Linker error] undefined reference to `joyGetPosEx@8' 
      [Linker error] undefined reference to `joyGetPosEx@8' 
      [Linker error] undefined reference to `joyGetPosEx@8' 
      [Linker error] undefined reference to `glGetError@0' 
      [Linker error] undefined reference to `gluErrorString@4' 
      ....
      ....
    This is the program
    Code :
    # include <GL/glut.h>
     
    int main(int argc,char** argv){
     
        glutInit(&amp;argc,argv);
     
    }
    I followed some tutorials on how to setup BloodShed but it always gives me this errors. I set up the project as multimedia/openGL project.
    Can anyone help me with this please.

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Dec 2007
    Location
    Hungary
    Posts
    992

    Re: linking problem with BloodShed

    This is not really an OpenGL related question, but here you go:

    You are missing a lot of libraries at link time. Try adding the following libraries to your project:

    gdi32
    opengl32
    glu32
    glut32
    winmm

    You can add libraries somewhere in the project settings (search for linker or library options there).
    Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
    Technical Blog: http://www.rastergrid.com/blog/

  3. #3
    Member Newbie
    Join Date
    Nov 2010
    Posts
    31

    Re: linking problem with BloodShed

    Hi,
    Thanks for reply. I already had 3 of those libraries.I added the 2 you mentioned and still have same errors.These are my libraries.. Libraries

  4. #4
    Senior Member Frequent Contributor
    Join Date
    Oct 2009
    Posts
    592

    Re: linking problem with BloodShed

    The only thing I can say is, try some other development environment. Like VS Express, or plain mingw, or even the cygwin environment. There are also others.

    Better yet, toss windows, use linux. There you get a compiler with every distro.

  5. #5
    Senior Member Regular Contributor
    Join Date
    Oct 2010
    Location
    France
    Posts
    458

    Re: linking problem with BloodShed

    -lgdi32 -lopengl32 -lglu32 -lglut32 -lwinmm

    should be the line you must provide to the linker.

Similar Threads

  1. BloodShed C++ question
    By joker40 in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 02-13-2011, 11:45 PM
  2. Bloodshed Dev-C++ Compile problem.
    By Me6 in forum OpenGL: Basic Coding
    Replies: 11
    Last Post: 06-11-2004, 02:28 PM
  3. How do you use GLUT in Bloodshed Dev C++?
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-25-2002, 02:40 AM
  4. Problem with GLUT/Bloodshed
    By JtheKing in forum OpenGL: Basic Coding
    Replies: 11
    Last Post: 11-08-2001, 05:26 PM
  5. Bloodshed compiler
    By JtheKing in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-04-2001, 01:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean