Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-16-2004, 01:07 PM   #1
Registered: May 2004
Posts: 166

Rep: Reputation: 17
Mesa-Glut compilation problem

OK I should use a makefile, but my first attempt at using mesa on a simple
Hello.cpp programme using

icc -static -o Hello Hello.cpp -L/usr/X11R6/lib -lX11 -lglut -lMesaGL -lMesaGLU -lXext -lm -lXmu

gives me a huge list of errors like

/usr/lib/libglut.a (glut event.o) glah blah
:undefined reference to function `Xflush'

As far as I can see I have all the libraries I need, I find Xflush is a basic Xlib function, but should -lX11 see to that?

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

/* Called when window needs to be redrawn */
void redraw()
glClear(GL_COLOR_BUFFER_BIT); /* clear screen to black */
/* just draw a boring red triangle */
glColor3f(1.f, 0.f, 0.f);
glVertex2f(-.5f, -.5f);
glVertex2f( .5f, -.5f);
glVertex2f( 0.f, .5f);

/* Parse arguments, and set up interface between OpenGL and window system */
main(int argc, char *argv[])
glutInit(&argc, argv);
glutInitWindowSize(512, 512);
(void)glutCreateWindow("simple program");
Old 09-16-2004, 01:33 PM   #2
Registered: May 2002
Location: dracut MA
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 109Reputation: 109
try putting the -o at the end. gcc and g++ sometimes do wierd things regarding specification of libraries and library paths if your -o comes first.

that's all I can think of.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mesa, glut and compiling opengl adhara Programming 3 05-08-2004 06:14 AM
mesa glut libraries adhara Linux - Software 6 05-08-2004 05:45 AM
Compiling a simple Mesa/GLUT program Bojdom Linux - Software 2 02-02-2003 05:19 PM
Installing Mesa & Mesa-demos... bozotix Linux - Software 2 05-09-2002 01:55 AM
glut/mesa/openGL gurra Programming 1 10-10-2001 04:36 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration