Archived

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

well here I am again with another wacked problem

This topic is 5673 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
Guest Anonymous Poster
are you sure you have glut and opengl installed?

Share this post


Link to post
Share on other sites