Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dead_man_walking

well here I am again with another wacked problem

This topic is 5886 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I started using linux and wanted to use opengl so i looked into glut. I''m trying to do one of the programs but it wont compile right for every function, gl and glut it gives me /home/yoda/housething/housething/main.cpp:39: undefined reference to `glutInit'' /home/yoda/housething/housething/main.cpp:40: undefined reference to `glutInitDisplayMode'' /home/yoda/housething/housething/main.cpp:41: undefined reference to `glutCreateWindow'' /home/yoda/housething/housething/main.cpp:42: undefined reference to `glutDisplayFunc'' /home/yoda/housething/housething/main.cpp:44: undefined reference to `glMatrixMode'' /home/yoda/housething/housething/main.cpp:45: undefined reference to `glutMainLoop''
  
#include <stdio.h>
#include <iostream.h>
#include <stdlib.h>

#include <GL/glu.h>
#include <GL/gl.h>
#include <GL/glut.h>


void Render();

int main(int argc, char **argv)
{
  glutInit(&argc,argv);                                       //initializes the GLUT framework

  glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);   //sets up the display mode

  glutCreateWindow("My first GLUT program");                  //creates a window

  glutDisplayFunc(Render);                                    //specifies our redraw function


  glMatrixMode(GL_MODELVIEW);
  glutMainLoop();

	return EXIT_SUCCESS;

}


void Render(){

// do rendering



}
  
this is the entire program. i''ve never had this kinda of problem before i don''t think. I got the same message when using kdevelop or using gcc in the console.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
are you sure you have glut and opengl installed?

Share this post


Link to post
Share on other sites
i figured out the linking, but now i get the same error for just about every function in the library! Isn''t that just weird. And i do have the newest version. I just downloaded the new one a few days ago.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!