Subject: RE: FW: question about cygwin OpenGL
From: "John P. Sutter" <[email-masked]>
To: <[email-masked]>
Date: Tue, 12 Oct 2004 10:45:43 +0900

-----Original Message-----
From: Igor Pechtchanski [mailto:[email-masked]] 
Sent: Tuesday, October 12, 2004 1:26 AM
To: John P. Sutter
Cc: [email-masked]
Subject: Re: FW: question about cygwin OpenGL

On Sun, 10 Oct 2004, John P. Sutter wrote:

>> Dear Cygwin users,
>>
>> I have downloaded the OpenGL library source code from cygwin onto my
>> Windows XP computer and have been trying to set it up from the
>> makefiles.
>
>First off, why would you want to do this if there are binary packages
>available for Cygwin?

Because I would like to install XFree86 on my system with the GLX
extension, which as far as I know is not included in the standard OpenGL
library, but must be compiled with it. I thought that this would require
the original source code for OpenGL. If I am wrong, and only the OpenGL
binaries available from cygwin are needed, I would be thrilled!

>> In directory glut-3.7.6, I first ran the mkmkfiles.image script
provided
>> with the package to generate the makefiles. Then I ran:
>>                                       make clean
>>                                       make includes
>>                                       make depend
>>                                       make
>>                                       make install.
>> The first three steps ran without error. But the fourth ("make")
>> produced a long list of "undefined reference" error messages. A
sample
>> of the output is below.

>Is there a "configure" script?  If so, did you run it first?

No, the OpenGL source code I downloaded does not have a configure
script. What you describe sounds so convenient that I wish it did. It
does, however, have an Imakefile file that is executed by the
mkmkfiles.image shell script. Is this a similar thing?

>> I have checked the Web, and it seems that the
>> undefined references are GLUT commands that should be defined
elsewhere.
>> However, I found no files on my system that define them, either in
the
>> OpenGL package I downloaded or anywhere else. I would appreciate any
>> help you would be willing to give. It seems very basic, but I have
>> checked various cygwin and OpenGL FAQ's without success.
>>
>> Yours truly,
>>
>> John P. Sutter
>> SPring-8/JASRI
>> 1 - 1 - 1 Kouto, Mikazuki-cho, Sayo-gun, Hyogo-ken 679-5198
>> JAPAN
>> Tel: +81 791 58 0802 (x3105)
>> Fax: +81 791 58 1816
>>
>> make[3]: Entering directory
`/usr/src/opengl-1.1.0-7/glut->3.7.6/progs/demos/glutmech'
>> gcc -O2 -fno-strength-reduce -Wall -Wpointer-arith
-I../../../include \
>>   -I/usr/X11R6/include    -D__i386__ -DWIN32_LEAN_AND_MEAN -DX_LOCALE
\
>>   -D_X86_ -D__CYGWIN__ -D_XOPEN_SOURCE \
>>   -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE \
>>   -D_SVID_SOURCE -D_GNU_SOURCE  -DFUNCPROTO=15 -DNARROWPROTO       -c
-o \
>>   glutmech.o glutmech.c
>> gcc   glutmech.o      -o glutmech
                   ^^^^             ^^^^
>> glutmech.o(.text+0x8cf):glutmech.c: undefined reference to
`_glRotatef'
>> [snip 402 more "undefined reference" errors]
>> collect2: ld returned 1 exit status
>> make[3]: *** [glutmech] Error 1
>> make[3]: Leaving directory
`/usr/src/opengl-1.1.0-7/glut->>3.7.6/progs/demos/glutmech'

>This is missing the libraries altogether -- no wonder it doesn't find
the
>functions.  I'd guess the LDLIBS and LDFLAGS variables weren't defined
>properly, probably due to you not having run "configure".  Or, maybe,
you
>just need to install the OpenGL libraries before you can compile client
>code...

I also figured that the necessary libraries weren't being linked to. But
I'm not sure what libraries the function definitions are stored in.
Could it be the w32api directories already stored on my system under
cygwin?

>Perhaps someone else can provide more hints.

I'd be very grateful if anyone could.

>	Igor
>-- 
>				http://cs.nyu.edu/~pechtcha/
>      |\      _,,,---,,_		[email-masked]
>ZZZzz /,`.-'`'    -.  ;-;;,_		[email-masked]
>     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
>    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!
>
>"Happiness lies in being privileged to work hard for long hours in
doing
>whatever you think is worth doing."  -- Dr. Jubal Harshaw

John P. Sutter
SPring-8/JASRI
1 - 1 - 1 Kouto, Mikazuki-cho, Sayo-gun, Hyogo-ken 679-5198
JAPAN
Tel: +81 791 58 0802 (x3105)
Fax: +81 791 58 1816

--
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/