PDA

View Full Version : linking problem with BloodShed



joker40
12-12-2010, 08:17 PM
I am having trouble compiling openGL with BloodShed. I added libraries like this Libraries (http://postimage.org/image/2qrg8pptw/)
But have this compiler errors


[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


# 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.

aqnuep
12-13-2010, 06:15 AM
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).

joker40
12-16-2010, 07:23 PM
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 (http://postimage.org/image/2hkmsznqc/)

ugluk
12-16-2010, 11:26 PM
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.

_arts_
12-17-2010, 04:13 AM
-lgdi32 -lopengl32 -lglu32 -lglut32 -lwinmm

should be the line you must provide to the linker.