From owner-freebsd-questions@FreeBSD.ORG Sat Jan 31 21:54:52 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D80D216A4D3 for ; Sat, 31 Jan 2004 21:54:50 -0800 (PST) Received: from host23.the-web-host.com (host23.the-web-host.com [209.239.32.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DAB643D2D for ; Sat, 31 Jan 2004 21:54:49 -0800 (PST) (envelope-from research@microcalorimetry.com) Received: from [192.168.1.20] (pool-141-154-178-129.wma.east.verizon.net [141.154.178.129])i115slmQ020428 for ; Sun, 1 Feb 2004 00:54:48 -0500 X-Sender: fisichel@www.communityrenewables.com Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Sun, 1 Feb 2004 00:54:41 -0500 To: freebsd-questions@freebsd.org From: research@microcalorimetry.com (Chris Fisichella) Subject: Compiling OpenGL code with GCC X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2004 05:54:52 -0000 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 #define 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