LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-28-2004, 04:46 PM   #1
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Rep: Reputation: 30
OPENgl not compiling on new fedora install


I am in an openGL class. The examples that the teacher provides are compiling on the university schools systems. The won't on my new fedora install (the university also uses fedora).

Basically I think that there are different GL libs installed???

when i type make lines (to make lines.c) it outputs this info:
gcc -O -Wall -g -gstabs -I/usr/include/GL -L/usr/lib -L/usr/X11R6/lib -lglut -lGLU -lGL -lXmu -lXi -lXext -lX11 -lm -o lines lines.c
/usr/bin/ld: cannot find -lglut
collect2: ld returned 1 exit status
make: *** [lines] Error 1

So I think there is a problem with the -lglut param. I have freeglut.h in /usr/include/GL, but no flut.h.

That can I get do to get this to comiple?

Here is a dir with the makefile and some c files that should comiple (I have seen them compile in class)

http://onyx.boisestate.edu/~tcole/cs...ll04/demo/ogl/


Thanks for any help

Last edited by zchoyt; 08-28-2004 at 04:50 PM.
 
Old 08-28-2004, 05:02 PM   #2
Stor_G
Member
 
Registered: Aug 2004
Posts: 50

Rep: Reputation: 15
the compiler can't find the library of glut
try to look for a file called
libglut.a and when you find it add the following flag to the compiler before the -lglut:
-LPATH
for example if the file is at /etc/somedir
the write -L/etc/somedir
this will tell the compiler to look for the library there.
if that doesn't work or if you don't have that file, try reinstalling the openGL development library.
 
Old 08-28-2004, 09:47 PM   #3
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Original Poster
Rep: Reputation: 30
You're sure that I need libglut.a (caps). Locate does not find it. I did updatedb just to be sure. How can I reinstall the library/package? I am new at linux. I appreciate your help.
 
Old 08-29-2004, 09:37 PM   #4
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
glut doesn't always come with Linux distributions. freeglut is a different animal from glut, I believe. I've never used freeglut, but from what I recall of it, it is basically a glut-like library with some of the problems of glut being fixed.

If you are using that, the library is likely named something else, so you can change -lglut to -lfreeglut or whatever the freeglut library is named. Otherwise, check here for a place to download glut from.
 
  


Reply


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
Compiling opengl progs slackware 10.1 Beezer Slackware 2 08-09-2005 01:02 PM
compiling mesa (opengl) shegay18 Programming 2 07-12-2005 03:08 AM
Compiling Xvnc with OpenGL support jasonM Red Hat 11 06-14-2005 04:08 AM
compiling opengl with cygwin adhara Programming 0 07-28-2004 05:58 AM
mesa, glut and compiling opengl adhara Programming 3 05-08-2004 05:14 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:02 PM.

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