gnustep / libs-base

The GNUstep Base Library is a library of general-purpose, non-graphical Objective C objects.
https://www.gnustep.org/
GNU General Public License v2.0
936 stars 282 forks source link

Windows build failure : 'MUI_LANGUAGE_NAME' undeclared #449

Closed rmottola closed 1 month ago

rmottola commented 1 month ago

on Windows 7 with gcc amdn mingw64

NSUserDefaults.m: In function 'systemLanguages':
NSUserDefaults.m:380:9: warning: implicit declaration of function 'GetUserPreferredUILanguages'; did you mean 'GetUserDefaultUILanguage'? [-Wimplicit-function-declaration]
  380 |   ret = GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &numberOfLanguages,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         GetUserDefaultUILanguage
NSUserDefaults.m:380:37: error: 'MUI_LANGUAGE_NAME' undeclared (first use in this function)
  380 |   ret = GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &numberOfLanguages,
      |                                     ^~~~~~~~~~~~~~~~~
NSUserDefaults.m:380:37: note: each undeclared identifier is reported only once for each function it appears in
 Compiling file NSValueTransformer.m ...
fredkiefer commented 1 month ago

This should be declared in include/winnls.h. Either we forgot to include that file or MinGW made a mistake in their header file.

rmottola commented 1 month ago

Have the same failure on Windows 10 with newer ming64 too.

we include winnls.h already, conditioned by _WIN32

rmottola commented 1 month ago

Make / configure do not pick up the change in GSConfig.h.in as a dependency. I forced a configure re-run, this elevated headers to Vista and the problem is fixed.