Author Topic: Undefined References when compiling/linking an openGLaopengl  (Read 4629 times)

theeil

  • Guest
Undefined References when compiling/linking an openGLaopengl
« on: March 29, 2005, 06:13:34 am »
I just downloaded the new version of c::b and it looks like it is good but I ran into one problem i had not found before in codeblocks or devc++ (all other copmpilers: vc98, vc 2003, borland 5.5... have this problem). I get the error:

undefined reference to '[opengl function]@[number]'

for example: undefined reference to '[email protected]'

and beta 3 compiled the same code with the same minGW install. one more thing: when i was using glut, vc2003 worked! I don't have a clue what is going on, if anyone can help me out with this one, that would be great! thanks.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Undefined References when compiling/linking an openGLaopengl
« Reply #1 on: March 29, 2005, 08:57:16 am »
Have you linked to opengl???
Be patient!
This bug will be fixed soon...

Anonymous

  • Guest
Undefined References when compiling/linking an openGLaopengl
« Reply #2 on: April 13, 2005, 04:12:33 pm »
It usally eazy to fix undefined reference error.  What your problem is you are missing a libbary file with the fuction you need in it.  Go Bring up your file search program and look for anything that contans text of the missing futtion.  This would be your '[email protected]'  in your example.  Also put *.a for Filename you are searching for if using mingw or *.lib vc++.   It will then give you a list of libarry wich have the fuction mention pick the name of the libbary and add it to be link in with your program.    

Ps on microsoft xp i had to enable Index seach and change some option so it search for text inside all files.