Compiling OpenGL code with MinGW

L

LoneWolf

Hi im trying to compile some code im developing that uses opengl and
glut on mingw(using eclipse as the IDE) but im having linker errors
like:

g++ -o(OUTPUT).exe (.o files here) -lopengl32 -lglu32 -lglaux -lglut32
Warning: resolving __imp__glEnable by linking to __imp__glEnable@4
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
Warning: resolving __imp__glBlendFunc by linking to
__imp__glBlendFunc@8

.... undefined reference to `_imp__glAlphaFunc'
.... undefined reference to `_imp__glAlphaFunc'
.... undefined reference to `_imp__glGenTextures'
.... undefined reference to `_imp__glBindTexture'
.... undefined reference to `_imp__glTexParameteri'
.... undefined reference to `_imp__glTexParameteri'
.... undefined reference to `_imp__glTexParameteri'
.... undefined reference to `_imp__glTexParameteri'
.... undefined reference to `_imp__glTexEnvf'
.... undefined reference to `_imp__glTexImage2D'
.... undefined reference to `_imp__glBindTexture'

I ommited the filename and the lines where the functions are being
used the important is the error itself.
As you can see I'm linking with openl32 etc so what am I missing?
 
Z

Zeppe

LoneWolf said:
Hi im trying to compile some code im developing that uses opengl and
glut on mingw(using eclipse as the IDE) but im having linker errors
like:

g++ -o(OUTPUT).exe (.o files here) -lopengl32 -lglu32 -lglaux -lglut32
Warning: resolving __imp__glEnable by linking to __imp__glEnable@4
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
Warning: resolving __imp__glBlendFunc by linking to
__imp__glBlendFunc@8

... undefined reference to `_imp__glAlphaFunc'
... undefined reference to `_imp__glAlphaFunc'
... undefined reference to `_imp__glGenTextures'
... undefined reference to `_imp__glBindTexture'
... undefined reference to `_imp__glTexParameteri'
... undefined reference to `_imp__glTexParameteri'
... undefined reference to `_imp__glTexParameteri'
... undefined reference to `_imp__glTexParameteri'
... undefined reference to `_imp__glTexEnvf'
... undefined reference to `_imp__glTexImage2D'
... undefined reference to `_imp__glBindTexture'

I ommited the filename and the lines where the functions are being
used the important is the error itself.
As you can see I'm linking with openl32 etc so what am I missing?

You are off-topic here, but I'd suggest you to check out the order of -l
in the g++ call: it's not invariant.
http://www.network-theory.co.uk/docs/gccintro/gccintro_18.html

Best wishes,

Zeppe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,799
Latest member
Mercury_Dev

Latest Threads

Top