mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: opengl compilation failure


From: Tony Theodore
Subject: Re: opengl compilation failure
Date: Sun, 21 Aug 2022 10:33:19 +1000

Hi Michael,


> On 21 Aug 2022, at 04:13, Michael Ivanov <ivans@logit-ag.de> wrote:
> 
> Greetings,
> 
> I'm trying to compile a qt5/opengl project using mxe and I'm getting the 
> following errors during linking:
> 
> […]
> /home/usr-local/mxe/usr/bin/x86_64-w64-mingw32.static-ld: 
> libqfrontext3.a(qPlaceLoad.O):/home/usr-local/mxe/usr/x86_64-w64-mingw32.static/include/GL/freeglut_std.h:641:
>  undefined reference to `__imp___glutCreateMenuWithExit'
> collect2: error: ld returned 1 exit status
> 
> Undefined identifiers belong to opengl, but libopengl32 and libglu32 are 
> referenced in link command. Which other libraries do I miss?

Check the output of pkg-config:

```
x86_64-w64-mingw32.static.gcc12-pkg-config --cflags --libs glut
-DFREEGLUT_STATIC -lglut -lglu32 -lopengl32 -lwinmm -lgdi32 -lm
```

Specifically, `-DFREEGLUT_STATIC` is required to resolve the undefined 
`__imp___*` errors.

Cheers,

Tony




reply via email to

[Prev in Thread] Current Thread [Next in Thread]