Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: <200310220539.h9M5d7Z26093@bigmail.research.att.com> From: suresh AT research DOT att DOT com To: cygwin AT cygwin DOT com Subject: Re: OpenGL and Cygwin Date: Wed, 22 Oct 2003 01:43:48 -0400 As per Andre's suggestion, i compiled and ran the attached program. Below are the outputs under different system settings: All programs run from tcsh inside cygwin. My LD_LIBRARY_PATH also had my current dir, because I had the nvidia glut32.dll and glut32.lib files in it (which work when compiled with visual C++ on a different machine - I tried one of their demos) This was the first run, just from scratch with no extra parameters. ---------------------------------------------------------------------- [Root AT euclid ~/src]$ g++ -o helloglut opengltest.c -lglut32 -lglu32 - lopengl32 /tmp/ccwy9vdk.o(.text+0xe):opengltest.c: undefined reference to `_glClear' /tmp/ccwy9vdk.o(.text+0x4c):opengltest.c: undefined reference to `_glutInit' /tmp/ccwy9vdk.o(.text+0x58):opengltest.c: undefined reference to `_glutCreateWin dow' /tmp/ccwy9vdk.o(.text+0x64):opengltest.c: undefined reference to `_glutDisplayFu nc' /tmp/ccwy9vdk.o(.text+0x69):opengltest.c: undefined reference to `_glutMainLoop' collect2: ld returned 1 exit status --------------------------------------------------------------------- To account for the vagaries of LD_LIBRARY_PATH, I then tried explicitly giving the desired paths for the lib files: ---------------------------------------------------------------- [Root AT euclid ~/src]$ g++ -o helloglut opengltest.c -L/usr/lib/w32api - lglut32 -lglu32 -lopengl32 /tmp/cc5Cu8ni.o(.text+0xe):opengltest.c: undefined reference to `_glClear' /tmp/cc5Cu8ni.o(.text+0x4c):opengltest.c: undefined reference to `_glutInit' /tmp/cc5Cu8ni.o(.text+0x58):opengltest.c: undefined reference to `_glutCreateWin dow' /tmp/cc5Cu8ni.o(.text+0x64):opengltest.c: undefined reference to `_glutDisplayFu nc' /tmp/cc5Cu8ni.o(.text+0x69):opengltest.c: undefined reference to `_glutMainLoop' collect2: ld returned 1 exit status ---------------------------------------------------------------------- I also then tried compiling with =mno-cygwin ----------------------------------------------------------------- [Root AT euclid ~/src]$ g++ -mno-cygwin -o helloglut opengltest.c -lglut32 - lglu32 -lopengl32 /tmp/cceShHmg.o(.text+0xe):opengltest.c: undefined reference to `__imp__glClear' /tmp/cceShHmg.o(.text+0x4e):opengltest.c: undefined reference to `_glutInit' /tmp/cceShHmg.o(.text+0x5a):opengltest.c: undefined reference to `_glutCreateWin dow' /tmp/cceShHmg.o(.text+0x66):opengltest.c: undefined reference to `_glutDisplayFu nc' /tmp/cceShHmg.o(.text+0x6b):opengltest.c: undefined reference to `_glutMainLoop' collect2: ld returned 1 exit status ------------------------------------------------------------------ The only difference in this case was the different library call for glClear. I also tried linking the /usr/X11R6/lib opengl libraries using - lGL. that cf course got rid of the glClear undefined reference but didn't solve the glut problem. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/