[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

Compiling OpenGL code with MinGW

LoneWolf

11/2/2008 7:50:00 PM

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?
3 Answers

Zeppe

11/3/2008 12:05:00 PM

0

LoneWolf wrote:
> 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/gccint...

Best wishes,

Zeppe

LoneWolf

11/3/2008 12:56:00 PM

0

On 3 Nov, 12:04, Zeppe <ze...@remove.all.this.long.comment.yahoo.it>
wrote:
> LoneWolf wrote:
> > 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/gccint...
>
> Best wishes,
>
> Zeppe- Ocultar texto citado -
>
> - Mostrar texto citado -

Sorry for being offtopic but I didn't found a better group to ask.
If you can advise me another more ontopic ill appreciate it.

thanks
LW

red floyd

11/3/2008 4:38:00 PM

0

On Nov 3, 4:56 am, LoneWolf <lonewo...@gmail.com> wrote:
> On 3 Nov, 12:04, Zeppe <ze...@remove.all.this.long.comment.yahoo.it>

> Sorry for being offtopic but I didn't found a better group to ask.
> If you can advise me another more ontopic ill appreciate it.

gnu.g++.help