FLTK & OpenGL

Hi

I need help…

I’ve implemented an image edition application, using OpenGL and FLTK 2.0.

This application works properly under linux and now i need it work under windows.

For this, I use visual C++ 6.0 and I obtain this errors

app.obj : error LNK2001: unresolved external symbol _glColorTable@24
> app.obj : error LNK2001: unresolved external symbol _glGetHistogram@20
> app.obj : error LNK2001: unresolved external symbol _glHistogram@16
> app.obj : error LNK2001: unresolved external symbol _glGetMinmax@20
> app.obj : error LNK2001: unresolved external symbol _glMinmax@12
> app.obj : error LNK2001: unresolved external symbol _glBlendEquation@4
> app.obj : error LNK2001: unresolved external symbol _glSeparableFilter2D@32
> app.obj : error LNK2001: unresolved external symbol _glConvolutionFilter2D@28
> app.obj : error LNK2001: unresolved external symbol _glConvolutionFilter1D@24
> app.obj : error LNK2001: unresolved external symbol _glConvolutionParameterf@12

and thus upto 44 errors.

I have have included opengl32.lib, glu32.lib and glut32.lib libraries.

Thanks

The problem is that the OpenGL32.lib only supports OpenGL V1.1 calls. It’s a common problem to use >OpenGL V1.1 functionality in Windows.

The most common way to access the higher functions is to use the extension mechanism since the 1.2 to 1.5 function are exposed as extensions.

There a couple of “wrappers” available to get around the problem.

This one for example:
http://oss.sgi.com/projects/ogl-sample/GLsdk.zip

or this one:
http://cvs1.nvidia.com/inc/GL/glext.h

Hope that helps.

Hi,

I’ve included the glext.h glu.h and glut.h and it has repared the link errors.

Well, now I’ve 11 errors:
…\glWindow.h(704) : error C2065: ‘glHistogram’ : undeclared identifier
…\glWindow.h(714) : error C2065: ‘glGetHistogram’ : undeclared identifier
…\glWindow.h(733) : error C2065: ‘glMinmax’ : undeclared identifier
…\glWindow.h(743) : error C2065: ‘glGetMinmax’ : undeclared identifier
…\glWindow.h(795) : error C2065: ‘glBlendEquation’ : undeclared identifier
…\glWindow.h(919) : error C2065: ‘glConvolutionParameterfv’ : undeclared identifier
…\glWindow.h(947) : error C2065: ‘glConvolutionParameterf’ : undeclared identifier
…\glWindow.h(1003) : error C2065: ‘glConvolutionFilter1D’ : undeclared identifier
…\glWindow.h(1026) : error C2065: ‘glConvolutionFilter2D’ : undeclared identifier
…\glWindow.h(1105) : error C2065: ‘glSeparableFilter2D’ : undeclared identifier
…\glWindow.h(1174) : error C2065: ‘glColorTable’ : undeclared identifier
Error executing cl.exe.

hellod.exe - 11 error(s), 0 warning(s)

You said you are including glext.h but the compiler says that you dont include it in your glWindows.h file.

I don’t understand.

I include the headers glext.h glu.h and glut.h
also the libraries opengl32.lib glu32.lib and glut32.lib

I need any more?

Originally posted by rafel_mg:
I include the headers glext.h glu.h and glut.h

Where do you include them?
Check if your file glWindow.h contains the line:

#include "glext.h"

I’ve included this:

#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
#include <fcntl.h>
//#include <unistd.h>
#include <string.h>
#include <math.h>
#include <windows.h>

#include <fltk/Window.h>
#include <fltk/GlWindow.h>
#include <fltk/DoubleBufferWindow.h>
#include <fltk/Widget.h>
#include <fltk/MenuBar.h>
#include <fltk/ItemGroup.h>
#include <fltk/Item.h>
#include <fltk/ValueSlider.h>
#include <fltk/run.h>

#include <GL/glext.h>
#include <GL/glu.h>
#include <GL/glut.h>

where glext.h gl.h glu.h glu.h and others are in the …\Microsoft Visual Studio\VC98\Include\GL folder

thanks!!

I’ve solved the problems with the mesa libraries 6.0.

Thanks!!

Simply including glext.h will not actually provide access to GL extensions. You must use the glwGetProcAddress call in order to get the function address for an extension.

Using Mesa 3d is a solution, but maybe not the best solution because it is not 100% compatible with the MS included opengl libraries.

Mesa 3D is backwards compatible with Microsoft’s opengl32.dll, however, as noted by somebody else, while Mesa 3D supports OpenGL v1.5 spec the MS implementation only supports up to v1.1.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.