LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 01-20-2004, 02:27 PM   #1
snu
Member
 
Registered: May 2003
Location: NRW
Distribution: FreeBSD
Posts: 64

Rep: Reputation: 15
glut (Opengl kompilierung)


I wanted to compile a little opengl test programm. At first I had the problem, that he didn t find my opengl headers (glut.h) for example. I made it by making a symlinka. Now he finds the glut.h but the next problem started. when i compile the program by gcc test.c i get this

/var/tmp//ccpE4ENI.o: In function `main':
/var/tmp//ccpE4ENI.o(.text+0x23): undefined reference to `glutInit'
/var/tmp//ccpE4ENI.o(.text+0x30): undefined reference to `glutInitDisplayMode'
/var/tmp//ccpE4ENI.o(.text+0x45): undefined reference to `glutInitWindowSize'
/var/tmp//ccpE4ENI.o(.text+0x54): undefined reference to `glutInitWindowPosition'
/var/tmp//ccpE4ENI.o(.text+0x64): undefined reference to `glutCreateWindow'
/var/tmp//ccpE4ENI.o(.text+0x74): undefined reference to `glutDisplayFunc'
/var/tmp//ccpE4ENI.o(.text+0x7c): undefined reference to `glutMainLoop'

Hmm I searched in internet found to compile it this way
bash-2.05b$ gcc test.c -lglut
heh i got this
/usr/bin/ld: cannot find -lglut
ok the failure messages shrink. I think the problem are the lib. I find the in /usr/X11R6/lib files like

libGL.so
libGL.so.1
libGLU.a
libGLU.so
libGLU.so.1
libGLcore.so
libGLcore.so.1
libGLw.a

but they are not in /usr/lib
and I think that is the prob. But do not know.
Do not tell me to install libglut. I tried it and got by compiling it:

ld: cannot find -lGL

that is a little bit funny in my oppinion. Please help I would be very glad.

chewy

The source will be with you. Always
 
Old 01-20-2004, 05:15 PM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Is /usr/X11R6/lib included in your /etc/ld.so.conf file? If not, add it (along with the paths of any other GL-related libraries, if they are located elsewhere), and be sure to run 'ldconfig' as root afterwards.

Whenever I compile openGL stuff, I usually need to use: -lGL -lGLU -lglut
 
  


Reply



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
Linux WS, OpenGL, and glut? pbail Linux - Software 1 12-16-2004 09:35 AM
openGL, glut and lights on C++ poeta_boy Programming 0 08-02-2004 05:21 PM
[opengl+glut]Please help me hylke Programming 2 05-10-2004 02:16 AM
problem OpenGL - glut vihan Programming 5 04-17-2004 06:53 AM
glut/mesa/openGL gurra Programming 1 10-10-2001 03:36 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 07:02 AM.

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