OpenGL cross-compile mingw32

Hello,

I am attempting to cross-compile my SDL application from
linux. It seems that the libopengl32.a which comes with
the cross compiling package does not contain the
ARB_multitexture extension. E.g.:

DungeonScreen.cc:161: undefined reference to glActiveTextureARB at 4' DungeonScreen.cc:161: undefined reference toglMultiTexCoord2fARB at 12’

Indeed, ‘strings’-ing the libopengl32.a does not reveal any
multitexture functions. Does anyone know how I can go
about creating or obtaining an opengl lib with which I
can cross compile? I am a bit confused about what to do.

Thanks,
JW–
// John Watson
// Software Engineer – STScI Archive Team

Hello,

I am attempting to cross-compile my SDL application from
linux. It seems that the libopengl32.a which comes with
the cross compiling package does not contain the
ARB_multitexture extension. E.g.:

DungeonScreen.cc:161: undefined reference to glActiveTextureARB at 4' DungeonScreen.cc:161: undefined reference toglMultiTexCoord2fARB at 12’

Indeed, ‘strings’-ing the libopengl32.a does not reveal any
multitexture functions. Does anyone know how I can go
about creating or obtaining an opengl lib with which I
can cross compile? I am a bit confused about what to do.

This is not a cross compilation error; libopengl should not contain any
references to any extensions. You have to resolve the addresess at runtime.
Check out any source that uses opengl extensions and you’ll find some code
like this: (windows specific here)
LockArrays = (PFNGLLOCKARRAYSSGIPROC)wglGetProcAddress(“glLockArraysSGI”);

UnlockArrays =
(PFNGLUNLOCKARRAYSSGIPROC)wglGetProcAddress(“glUnlockArraysSGI”);

I think mjk had a tutorial to extensions on www.opengl.org … sample code
taken from http://trant.sgi.com/opengl/examples/more_samples/vcull.zip

/j

This is not a cross compilation error; libopengl should not contain any
references to any extensions. You have to resolve the addresess at runtime.
Check out any source that uses opengl extensions and you’ll find some code
like this: (windows specific here)
LockArrays = (PFNGLLOCKARRAYSSGIPROC)wglGetProcAddress(“glLockArraysSGI”);

UnlockArrays =
(PFNGLUNLOCKARRAYSSGIPROC)wglGetProcAddress(“glUnlockArraysSGI”);

When using SDL, you can use SDL_GL_GetProcAddress(“glUnlockArraysSGI”);

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Hello,

I am attempting to cross-compile my SDL application from
linux. It seems that the libopengl32.a which comes with
the cross compiling package does not contain the
ARB_multitexture extension. E.g.:

DungeonScreen.cc:161: undefined reference to glActiveTextureARB at 4' DungeonScreen.cc:161: undefined reference toglMultiTexCoord2fARB at 12’

Indeed, ‘strings’-ing the libopengl32.a does not reveal any
multitexture functions. Does anyone know how I can go
about creating or obtaining an opengl lib with which I
can cross compile? I am a bit confused about what to do.

Thanks,
JW

Oh, btw if you really want to use the functions as you’ve written them
now without any pointer dereferencing, check out

http://wwwmath.uni-muenster.de/cs/u/kostab/glext.h

I haven’t used it myself, but it seems quite good.

/jOn Thu, 8 Jun 2000, John Watson wrote:


Jim Tilander

Thanks for all your help, Jim and Sam. I have my
multitexture problems all worked out now. However, I
am still getting link errors for glu functions.
Perhaps you can further assist a hapless cross compiler
newbie :slight_smile:

It seems the linker is simply not finding any of the
glu functions that I am using (gluOrtho2D, gluPerspective,
gluBuild2DMipmaps). This occurs no matter what order I
put my -lopengl32 -lglu32 options in.

Is there something I should know about linking with libglu32.a?
Am I going to need to lookup the function pointers at runtime,
like the extensions?

My compiler link options look like this:

g++ -Dmain=SDL_main -DWIN32 -g main.o -o …/bin/dg -L/usr/local/cross-tools/i386-mingw32/lib -lSDL_mixer -lSDL_net -lwsock32 -lmingw32 -lSDLmain -lSDL -luser32 -lgdi32 -lwinmm -ldxguid -mwindows -lpng -lz -lopengl32 -lglu32

Thanks,
JW

John Watson wrote:>

Hello,

I am attempting to cross-compile my SDL application from
linux. It seems that the libopengl32.a which comes with
the cross compiling package does not contain the
ARB_multitexture extension. E.g.:

DungeonScreen.cc:161: undefined reference to glActiveTextureARB at 4' DungeonScreen.cc:161: undefined reference toglMultiTexCoord2fARB at 12’

Indeed, ‘strings’-ing the libopengl32.a does not reveal any
multitexture functions. Does anyone know how I can go
about creating or obtaining an opengl lib with which I
can cross compile? I am a bit confused about what to do.

Thanks,
JW


// John Watson
// Software Engineer – STScI Archive Team


// John Watson
// Software Engineer – STScI Archive Team