Advertisement

Undefined References

Started by July 26, 2004 08:08 PM
1 comment, last by PatoDonald 20 years, 7 months ago
I downloaded the source file for dev-c++ (my version is 4.01) and I'm getting the following errors: C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x38):lesson1.cpp: undefined reference to `glViewport@16' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x45):lesson1.cpp: undefined reference to `glMatrixMode@4' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x4d):lesson1.cpp: undefined reference to `glLoadIdentity@0' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x84):lesson1.cpp: undefined reference to `gluPerspective@32' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x91):lesson1.cpp: undefined reference to `glMatrixMode@4' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x99):lesson1.cpp: undefined reference to `glLoadIdentity@0' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0xb7):lesson1.cpp: undefined reference to `glShadeModel@4' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0xd1):lesson1.cpp: undefined reference to `glClearColor@16' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0xe0):lesson1.cpp: undefined reference to `glClearDepth@8' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0xf0):lesson1.cpp: undefined reference to `glEnable@4' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x100):lesson1.cpp: undefined reference to `glDepthFunc@4' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x115):lesson1.cpp: undefined reference to `glHint@8' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x13b):lesson1.cpp: undefined reference to `glClear@4' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x143):lesson1.cpp: undefined reference to `glLoadIdentity@0' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x258):lesson1.cpp: undefined reference to `wglMakeCurrent@8' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x282):lesson1.cpp: undefined reference to `wglDeleteContext@4' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x854):lesson1.cpp: undefined reference to `ChoosePixelFormat@8' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x898):lesson1.cpp: undefined reference to `SetPixelFormat@12' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x8ce):lesson1.cpp: undefined reference to `wglCreateContext@4' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0x914):lesson1.cpp: undefined reference to `wglMakeCurrent@8' C:\WINDOWS\TEMP\cchgEYfb.o(.text+0xc2f):lesson1.cpp: undefined reference to `SwapBuffers@4' why is that happenning?
add the OpenGl library to your link step.

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

Advertisement
Well, i linked the files and now i'm getting this:

C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\Opengl32.lib(OPENGL32.dll): warning: ignoring duplicate section `.text'
C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\Opengl32.lib(OPENGL32.dll): warning: ignoring duplicate section `.idata$5'
C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\Opengl32.lib(OPENGL32.dll): warning: ignoring duplicate section `.text'
C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\Opengl32.lib(OPENGL32.dll): warning: ignoring duplicate section `.idata$5'
C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\Opengl32.lib(OPENGL32.dll): warning: ignoring duplicate section `.text'
C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\Opengl32.lib(OPENGL32.dll): warning: ignoring duplicate section `.idata$5'
C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\Opengl32.lib(OPENGL32.dll): warning: ignoring duplicate section `.text'
C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\Opengl32.lib(OPENGL32.dll): warning: ignoring duplicate section `.idata$5'
C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\Glu32.lib(GLU32.dll): warning: ignoring duplicate section `.text'
C:\DEV-C_~1\BIN\ld.exe: C:\Dev-C++\Lib\Glu32.lib(GLU32.dll): warning: ignoring duplicate section `.idata$5'
C:\Dev-C++\Lib\Glu32.lib(GLU32.dll)(.debug$S+0x0): multiple definition of `idata$2'
C:\Dev-C++\Lib\Opengl32.lib(OPENGL32.dll)(.debug$S+0x0): first defined here
C:\Dev-C++\Lib\Glu32.lib(GLU32.dll)(.debug$S+0x0): multiple definition of `idata$4'
C:\Dev-C++\Lib\Opengl32.lib(OPENGL32.dll)(.debug$S+0x0): first defined here
C:\Dev-C++\Lib\Glu32.lib(GLU32.dll)(.debug$S+0x0): multiple definition of `idata$5'
C:\Dev-C++\Lib\Opengl32.lib(OPENGL32.dll)(.debug$S+0x0): first defined here

This topic is closed to new replies.

Advertisement