Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Feb 2004 08:21:41 -0500
From:      "Chris Fisichella" <research@microcalorimetry.com>
To:        <freebsd-questions@freebsd.org>
Subject:   RE: Compiling OpenGL code with GCC
Message-ID:  <003f01c3e98f$7f2e4600$3200a8c0@S0026730663>
In-Reply-To: <401C975D.5040703@hqst.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Yes, that was just a typo. I think I will try to look at some screensave
code. Maybe there are some compiling hints in there.

Does anybody have any ideas?

Chris


Chris Fisichella wrote:

>>#define <GL/glx.h>
>>  
>>

>Is that just a typo for your e-mail? It should be

>#include <GL/glx.h>

>--roop
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
freebsd-questions-unsubscribe@freebsd.org

Hi,
I am using FreeBSD 4.4 with  GCC 2.95. I am trying to get a simple
OpenGL program to compile. I think I am having linking issues.

The problem is this error I get from the compiler:
undefined reference to 'glXQueryExtension'

Now, I call that function in my code. I found the prototype for it in
/usr/X11R6/include/GL/glx.h.

On the compiler line, I specify
-I/usr/X11R6/include
and (I think) the compiler can then resolve the

#include <GL/glx.h>
statement I have in my source code and, hence find the include file.

Additionally, the book I am reading has me specify the following
libraries: -lGL -lXext -lX11

I added the library directory flag:
-L/usr/X11R6/lib

where I find libGL.a, libXext.a and libX11.a are located.

Well, I kept getting that error. So, I tried renaming the compiler
libraries on the command line: -llibGL -llibXext -lX11

and tried other permutations to try to get this code to link. But, it
won't and I am stuck. If any one out there has some insight into this, I
would appreciate some help.

Thanks very much,

Chris




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003f01c3e98f$7f2e4600$3200a8c0>