delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-Id: | <4.3.2.7.0.20021113093213.0231cb10@irispavp.igb.umontreal.ca> |
X-Sender: | bleau2 AT irispavp DOT igb DOT umontreal DOT ca |
Date: | Wed, 13 Nov 2002 09:57:58 -0500 |
To: | cygwin AT cygwin DOT com |
From: | Andre Bleau <bleau AT igb DOT umontreal DOT ca> |
Subject: | Re: Linking with OpenGL, glut |
Mime-Version: | 1.0 |
X-MDRemoteIP: | 10.52.50.2 |
X-Return-Path: | bleau AT igb DOT umontreal DOT ca |
X-MDaemon-Deliver-To: | cygwin AT cygwin DOT com |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id gADEwdl20153 |
Braden McDaniel wrote: >I'm having some trouble with the directions in README.txt in the OpenGL >docs. They indicate one should use "-lopengl32"; however, that's not working >for me. Here is the excerpt from my config.log: >--- >configure:16198: gcc -o conftest.exe -g -O2 -I/usr/X11R6/include >conftest.c -lopengl32 -L/usr/X11R6/lib -lm >&5 There seems to be some misunderstanding here. The OpenGL package is for producing native Windows programs, not X11-dependant programs. Do not use -I/usr/X11R6/include , -L/usr/X11R6/lib , and -lm if you want to use that package. >/cygdrive/c/DOCUME~1/Braden/LOCALS~1/Temp/ccef6CMT.o(.text+0x1d): In >function `main': >/home/Braden/src/openvrml/openvrml/BUILD/configure:16190: undefined >reference to `_glBegin' This shows that you are not including the right GL headers. If you were pulling the right headers but linking incorrectly, the message would have been: " undefined reference to `_glBegin AT 4' ". >collect2: ld returned 1 exit status >configure:16201: $? = 1 >configure: failed program was: >#line 16170 "configure" >#include "confdefs.h" > ># ifdef _WIN32 ># include <windows.h> ># endif ># ifdef HAVE_OPENGL_GL_H ># include <OpenGL/gl.h> ># else ># include <GL/gl.h> ># endif > >#ifdef F77_DUMMY_MAIN ># ifdef __cplusplus > extern "C" ># endif > int F77_DUMMY_MAIN() { return 1; } >#endif >int >main () >{ >glBegin(0) > ; > return 0; >} >--- The following conftest.c programs compiles and link correctly: #include <GL/gl.h> int main () { glBegin(0) ; return 0; } gcc -o conftest -g -O2 conftest.c -lopengl32 >There's a similar problem with using -lglu32. However, -lGL works and -lGLU >works. So I wouldn't be complaining at all if I could figure out how to link >with glut. Neither "-lglut32 -lGLU -lGL" nor "-lglut -lGLU -lGL" works. Any >ideas? > >Braden > Again -lglut32 is for linking native Windows programs. Use the right include statements and the right headers: #include <GL/gl.h> #include <GL/glut.h> Link with -lglut32 -lglu32 -lopengl32 . -lGL and -lGLU are for X11 dependant programs. There is no Glut library in Cygwin's X11R6 distribution. André Bleau, Cygwin's OpenGL package maintainer. email: bleau at igb dot umontreal dot ca (Fight SPAM: encode your email-address) Please address all questions and problem reports about Cygwin's OpenGL package to cygwin AT cygwin DOT com . -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |