STEPS TO COMPILE FREEGLUT-2.4.0 UNDER OPEN WATCOM 1.5+
STEP 1
goto: FreeGLUT homepage
download and expand sources of freeglut-2.4.0, [assuming c:\freeglut-2.4.0]
STEP 2
with your favorite text editor open the files:
c:\freeglut-2.4.0\include\GL\freeglut_std.h
c:\freeglut-2.4.0\src\freeglut_internal.h
search the string: defined(_MSC_VER)
replace with: defined(_MSC_VER) || defined(__WATCOMC__)
example:
#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
becomes:
#if defined(_MSC_VER) || defined(__WATCOMC__) || defined(__CYGWIN__) || defined(__MINGW32__)
STEP 3
create the dir c:\freeglut-2.4.0\ow\
STEP 4
create new watcomc project target name: freeglut_static (create it into dir c:\freeglut-2.4.0\ow\)
STEP 5
choose target environment: library [.lib]
STEP 6
add sources to the created project
c:\freeglut-2.4.0\src\*.c
c:\freeglut-2.4.0\src\*.h
STEP 7
goto menu Options->C Compiler Switches
Include directories add: c:\freeglut-2.4.0\include
Macro definitions add: FREEGLUT_STATIC
STEP 8
Make the library (F4)
The file c:\freeglut-2.4.0\ow\freeglut_static.lib is your library!
STEPS TO USE COMPILED LIBRARY
Here you find some good examples of glut: SGI - Products: OpenGL: Examples: Redbook
I assume that you got a open watcom project, with a source that need "glut.h"
#include <GL/glut.h>
STEP 1
Menu Options->C Compiler Switches
Include directories add: c:\freeglut-2.4.0\include
Macro definitions add: FREEGLUT_STATIC
STEP 2
Menu Options->Windows Linking Switches
Library directories add: c:\freeglut-2.4.0\ow\
STEP 3
Compile your source that uses glut.h
Back to homepage
Number of times this page has been visited since December 22, 2006: