Experiencing problems with OpenGL

André Bleau andre_bleau@hotmail.com
Tue May 10 15:27:00 GMT 2005


Julian Moorsm wrote:

>
>Hi everybody,
>?

Hi Julian,

Welcome to the Cygwin list.

>First and foremost I have to say that I am so happy with the concept of
>Cygwin and to the Cygwin volunteers ?Keep up with the good work. It is
>so much appreciated?. I am having a little problem with compiling an
>OpenGL sourcefile.
>?
>Here's what I've done so far:
>?
>Installed Cygwin using setup.exe to c:\cygwin using default settings
>onto Windows XP SP 2 OS.
>Installed make, g++ and nano by running setup.exe again.
>Read the readme file located under /usr/share/opengl1-1-0.
>Little confused about what switches I should use when compiling .cpp
>file and whether to use a makefile or not.
>Ran the OpenGL examples to test if it?s possible to run the .exe files
>compiled and linked under Cygwin. All examples ran successfully.
>Tried to compile the following .cpp file whilst using -lglu32 -lopengl32
>switches with g++:
>

So, you have done some homework; that's good. Now, it would have been easier 
to help you if you had written in your help request the _exact command line_ 
you had typed to invoke g++, along with the _exact error messages_ you 
received.

>...
>
>An example program
>
>...
>
>This .cpp source file compiles perfectly under Visual Studio 6.0, but as
>I don?t have it anymore I?m unable to compile it now. Is there anyway I
>can compile this source under Cygwin or will I have to rewrite it and
>make use of the GLUI and GLUX libraries. If so could you explain this
>process for me with compile/linker command line switches. Thanks for
>your help.
>
>Julian
>

I just copied your example code to a file I named julian.cpp and compiled 
and linked it with:

g++ -o julian julian.cpp -lglu32 -lopengl32 -lgdi32

I got 3 warnings but no error. julian.exe is runable. While it is true that 
most people developing Windows native OpenGL applications with Cygwin use a 
toolkit such as GLUT or GLUI, it is certainly possible to do without; just 
add -lgdi32 at the end of your command line to resolve calls to the M$ 
Graphics Device Interface library. If you use other functions from M$ libs, 
you will have to add the approriate -l arguments. See /usr/lib/w32api to see 
what's available.

Regards,

André Bleau,
Cygwin's OpenGL package maintainer.

_________________________________________________________________
Des mécanismes de contrôle parental puissants permettent à votre enfant de 
découvrir tout ce qu’Internet a à offrir. 
http://join.msn.com/?pgmarket=fr-ca&page=features/parental Commencez dès 
maintenant à profiter de tous les avantages de MSN Premium et obtenez les 
deux premiers mois GRATUITS*.


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



More information about the Cygwin mailing list