[ Previous | Next | Table
Of Contents ]
CHAPTER 2 Compiling Demos
Makefiles - IBM C Set or Visual Age compiler
Makefiles are for IBM C Set or Visual Age compiler. Makefiles for all different
OS/2 compilers are not included with OpenGL . Compiler and linker flags
are explained in the provided C Set makefile. Link statements are also
provided for VACPP. If using VACPP, set VACPP=1 before you compile.
Makefiles - Other Compilers
You should read the explanations in the Makefiles for the switches we use
with the IBM C Set compiler. You should make sure you compile/ link your
demos with case exact turned on, meaning you want the com- piler/linker
to call glVertex3fv(), not call GLVERTEX3FV(). Make sure you specify a
very big stack, if you look at our .def files (another C Set-ism), we are
specifying a 1 meg stack for small demos. Cur- rently to run Viewperf,
the official OpenGL benchmark, we specify a STACKSIZE of 4meg. I know that
you won't get a STACKSIZE this big without specifying it. The OpenGL entry
points pass the parame- ters on the stack, so your calling sample should
do this (as opposed to passing in registers). Read through the C Set compiler/linker
parame- ters as described in makefiles.
IBM Developers Toolkit
Even if you are using another compiler, you will probably need the IBM
Developer's Toolkit. For OpenGL, it gives you the needed OS/2 header files
to compile. Some compilers include it, it is also included in the Developer
Connection for OS/2 CD's. For example, you need os2.h (and all the other
header files that go with it), and in the case of gcc, you will need LINK386.EXE
to link your programs together. For OS/2 2.1, you can purchase it separately,
for Warp, it is packaged with the Developer Connection for OS/2. Call 1-800-6DEVCON
to subscribe.
[ Previous | Next
| Table Of Contents ]