public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: OpenGL: Linker errors when trying to compile w/GLUI
@ 2008-05-16 15:27 André Bleau
  0 siblings, 0 replies; 3+ messages in thread
From: André Bleau @ 2008-05-16 15:27 UTC (permalink / raw)
  To: cygwin



godescbach  wrote: 

> Hi,
> 
> I am trying to compile example1.cpp in
> /var/share/doc/opengl-1.1.0/GLUIexamples/Cygwin. After trying numerous
> possibilities, I am at a loss. And there is no information on the web
> about this specific issue. Please advise.
> 
> $ uname -a
> CYGWIN_NT-5.1 escher_notebook 1.5.25(0.156/4/2) 2008-04-17 12:11 i686 Cygwin 

This info is not very usefull for me to help you; it tells only which version of the cygwin1.dll you use.
It would be more significant to report the output of : 

cygcheck -c openGL 

which would tell us which version of the openGL package you have. 
I will assume 1.1.0-8 which is the latest; if not, please upgrade to it using the setup program. 

> 
> $ g++ -O2 -mno-cygwin example1.cpp -o example1 -L/usr/lib/w32api -lglui -lglut3
> 2 -lglu32 -lopengl32
> /usr/lib/w32api/libglui.a(glui_spinner.o):glui_spinner.cpp:(.text+0xd): undefine
> d reference to `___getreent'
> ...
> /usr/lib/w32api/libglui.a(glui_edittext.o):glui_edittext.cpp:(.text+0x237): more
> undefined references to `___getreent' follow> collect2: ld returned 1 exit status
> 

No surprise: -mno-cygwin and -L/usr/lib/w32api are incompatible 

> godescbachM@escher_notebook /usr/share/doc/opengl-1.1.0/GLUIexamples/Cygwin
> $ view /usr/share/doc/Cygwin/opengl-1.1.0-8.README
>  

That file tells you how to rebuild the package from its sources. I don't think that's what you intended.
To learn how to _use_ the package, please view: 

/usr/share/doc/opengl-1.1.0/README.txt 

> godescbachM@escher_notebook /usr/share/doc/opengl-1.1.0/GLUIexamples/Cygwin
> $ make> g++ -c -O2 -mno-cygwin example1.cpp
> g++ -O2 -mno-cygwin example1.o -L/usr/lib/w32api -lglui -lglut32 -lglu32 -lope
> ngl32 -o example1> /usr/lib/w32api/libglui.a(glui_spinner.o):glui_spinner.cpp:(.text+0xd): undefine
> d reference to `___getreent'
> ...
> /usr/lib/w32api/libglui.a(glui_edittext.o):glui_edittext.cpp:(.text+0x237): more
> undefined references to `___getreent' follow
> collect2: ld returned 1 exit status
> make: *** [example1] Error 1 

Obviously you added -L/usr/lib/w32api to the makefile. Undo all your changes to that file;
if unsure reinstall the package with the setup program. Then: 

cd /usr/share/doc/opengl-1.1.0/GLUIexamples
make clean
make 

That will build all 6 examples for both Cygwin (executables in the Cygwin subdir) 
and Mingw (executables in the Mingw subdir). 

Regards, 

- André Bleau, volunteer Cygwin's openGL package maintainer. 

P.S.: Please send all questions and comments about the openGL package to cygwin at cygwin dot com.



_________________________________________________________________


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: OpenGL: Linker errors when trying to compile w/GLUI
  2008-05-16  8:14 godescbach
@ 2008-05-16 15:27 ` Brian Dessent
  0 siblings, 0 replies; 3+ messages in thread
From: Brian Dessent @ 2008-05-16 15:27 UTC (permalink / raw)
  To: godescbach; +Cc: cygwin

godescbach wrote:

> $ g++ -O2 -mno-cygwin example1.cpp -o example1 -L/usr/lib/w32api -lglui -lglut3
> 2 -lglu32 -lopengl32
> /usr/lib/w32api/libglui.a(glui_spinner.o):glui_spinner.cpp:(.text+0xd): undefine
> d reference to `___getreent'

This error means you're trying to use a Cygwin library from MinGW
(-mno-cygwin).  That won't work.  If you're going to use MinGW you can't
use Cygwin libraries.  The above command works fine for me after
removing -mno-cygwin.

Brian

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* OpenGL: Linker errors when trying to compile w/GLUI
@ 2008-05-16  8:14 godescbach
  2008-05-16 15:27 ` Brian Dessent
  0 siblings, 1 reply; 3+ messages in thread
From: godescbach @ 2008-05-16  8:14 UTC (permalink / raw)
  To: cygwin


Hi,

I am trying to compile example1.cpp in
/var/share/doc/opengl-1.1.0/GLUIexamples/Cygwin. After trying numerous
possibilities, I am at a loss.  And there is no information on the web
about this specific issue.  Please advise.

$ uname -a
CYGWIN_NT-5.1 escher_notebook 1.5.25(0.156/4/2) 2008-04-17 12:11 i686 Cygwin

$ g++ -O2 -mno-cygwin example1.cpp -o example1 -L/usr/lib/w32api -lglui -lglut3
2 -lglu32 -lopengl32
/usr/lib/w32api/libglui.a(glui_spinner.o):glui_spinner.cpp:(.text+0xd): undefine
d reference to `___getreent'
/usr/lib/w32api/libglui.a(glui_spinner.o):glui_spinner.cpp:(.text+0x25): undefin
ed reference to `___getreent'
/usr/lib/w32api/libglui.a(glui_edittext.o):glui_edittext.cpp:(.text+0x92): undef
ined reference to `___getreent'
/usr/lib/w32api/libglui.a(glui_edittext.o):glui_edittext.cpp:(.text+0xd9): undef
ined reference to `___getreent'
/usr/lib/w32api/libglui.a(glui_edittext.o):glui_edittext.cpp:(.text+0x1c7): unde
fined reference to `___getreent'
/usr/lib/w32api/libglui.a(glui_edittext.o):glui_edittext.cpp:(.text+0x237): more
 undefined references to `___getreent' follow
collect2: ld returned 1 exit status

godescbachM@escher_notebook /usr/share/doc/opengl-1.1.0/GLUIexamples/Cygwin
$ view /usr/share/doc/Cygwin/opengl-1.1.0-8.README

godescbachM@escher_notebook /usr/share/doc/opengl-1.1.0/GLUIexamples/Cygwin
$ make
g++ -c -O2 -mno-cygwin   example1.cpp
g++ -O2 -mno-cygwin   example1.o -L/usr/lib/w32api -lglui -lglut32 -lglu32 -lope
ngl32   -o example1
/usr/lib/w32api/libglui.a(glui_spinner.o):glui_spinner.cpp:(.text+0xd): undefine
d reference to `___getreent'
/usr/lib/w32api/libglui.a(glui_spinner.o):glui_spinner.cpp:(.text+0x25): undefin
ed reference to `___getreent'
/usr/lib/w32api/libglui.a(glui_edittext.o):glui_edittext.cpp:(.text+0x92): undef
ined reference to `___getreent'
/usr/lib/w32api/libglui.a(glui_edittext.o):glui_edittext.cpp:(.text+0xd9): undef
ined reference to `___getreent'
/usr/lib/w32api/libglui.a(glui_edittext.o):glui_edittext.cpp:(.text+0x1c7): unde
fined reference to `___getreent'
/usr/lib/w32api/libglui.a(glui_edittext.o):glui_edittext.cpp:(.text+0x237): more
 undefined references to `___getreent' follow
collect2: ld returned 1 exit status
make: *** [example1] Error 1

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-16 15:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-16 15:27 OpenGL: Linker errors when trying to compile w/GLUI André Bleau
  -- strict thread matches above, loose matches on Subject: below --
2008-05-16  8:14 godescbach
2008-05-16 15:27 ` Brian Dessent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).