Repository navigation
Description
Building fails on my Windows 11 using Qt 6.8.2. Build output reads as:
C:\Users\birge\Documents\DEV\MASTER\stellarium-master\src\core\modules\Planet.cpp(3517): error C2065: 'APIENTRY': undeclared identifier
C:\Users\birge\Documents\DEV\MASTER\stellarium-master\src\core\modules\Planet.cpp(3517): error C2275: 'GLenum': expected an expression instead of a type
C:\Users\birge\Documents\DEV\MASTER\stellarium-master\src\core\modules\Planet.cpp(3517): warning C4353: nonstandard extension used: constant 0 as function expression. Use '__noop' function intrinsic instead
C:\Users\birge\Documents\DEV\MASTER\stellarium-master\src\core\modules\Planet.cpp(3517): error C2066: cast to function type is illegal
C:\Users\birge\Documents\DEV\MASTER\stellarium-master\src\core\modules\Planet.cpp(3517): error C2440: 'reinterpret_cast': cannot convert from 'QFunctionPointer' to 'void (GLenum)'
C:\Users\birge\Documents\DEV\MASTER\stellarium-master\src\core\modules\Planet.cpp(3517): note: There are no conversions to function types, although there are conversions to references or pointers to functions
C:\Users\birge\Documents\DEV\MASTER\stellarium-master\src\core\modules\Planet.cpp(3518): error C2065: 'APIENTRY': undeclared identifier
C:\Users\birge\Documents\DEV\MASTER\stellarium-master\src\core\modules\Planet.cpp(3518): error C2275: 'GLenum': expected an expression instead of a type
C:\Users\birge\Documents\DEV\MASTER\stellarium-master\src\core\modules\Planet.cpp(3518): warning C4353: nonstandard extension used: constant 0 as function expression. Use '__noop' function intrinsic instead
C:\Users\birge\Documents\DEV\MASTER\stellarium-master\src\core\modules\Planet.cpp(3518): error C2066: cast to function type is illegal
C:\Users\birge\Documents\DEV\MASTER\stellarium-master\src\core\modules\Planet.cpp(3518): error C2440: 'reinterpret_cast': cannot convert from 'QFunctionPointer' to 'void (GLenum)'
C:\Users\birge\Documents\DEV\MASTER\stellarium-master\src\core\modules\Planet.cpp(3518): note: There are no conversions to function types, although there are conversions to references or pointers to functions
It appears the commit e4e2a22 causes this.
Am I missing some dependency?
Activity
10110111 commentedon Mar 29, 2025
What if you try this?
Add manually-resolved glDrawBuffer and glReadBuffer to Planet::initFBO
Atque commentedon Mar 29, 2025
@10110111 No luck, but adding
#include <windows.h>as suggested by @uwes-ufo works.10110111 commentedon Mar 29, 2025
Hmm, strange. But including
<windows.h>is a hack that shouldn't be required.10110111 commentedon Mar 29, 2025
Generally,
APIENTRYshould be defined byqopengl.h, which is included byPlanet.hpp. I wonder how this identifier fails to be defined.gzotti commentedon Mar 29, 2025
It's weird, at the end of qopengl.h it becomes undefined!
If I add this after all includes in Planet.cpp, it works (but is there a non-hacked solution?)
uwes-ufo commentedon Mar 29, 2025
QOPENGLF_APIENTRYPseems to work. #3763Attempt to fix Stellarium#4256 as for Stellarium#3763
github-actions commentedon Mar 30, 2025
Hello @Atque!
Please check the fresh version (development snapshot) of Stellarium:
https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot
github-actions commentedon Jun 22, 2025
Hello @Atque!
Please check the latest stable version of Stellarium:
https://github.com/Stellarium/stellarium/releases/latest