cross-compiling for win32: error: ‘GetUserDefaultLocaleName’ was not declared in this scope

This forum is about all development around libVLC.
its_ayush_07
New Cone
New Cone
Posts: 4
Joined: 11 Feb 2023 14:12

cross-compiling for win32: error: ‘GetUserDefaultLocaleName’ was not declared in this scope

Postby its_ayush_07 » 01 Apr 2023 12:27

Hi,

I am trying to build VLC 4.0 for a Windows 64 bit system by cross compiling it from Ubuntu 22.04. I am following this doc https://wiki.videolan.org/Win32Compile
I am compiling the contribs manually as the prebuilt libraries are outdated (works for VLC 2.2.x only).
I am facing the following error:

Code: Select all

/home/its-ayush-07/Desktop/vlc/contrib/win32/libaribcaption/src/renderer/font_provider_directwrite.cpp: In function ‘uint32_t aribcaption::GetDWriteLocaleIndex(IDWriteLocalizedStrings*)’: /home/its-ayush-07/Desktop/vlc/contrib/win32/libaribcaption/src/renderer/font_provider_directwrite.cpp:91:19: error: ‘GetUserDefaultLocaleName’ was not declared in this scope; did you mean ‘GetUserDefaultUILanguage’? 91 | int success = GetUserDefaultLocaleName(locale_name, LOCALE_NAME_MAX_LENGTH); | ^~~~~~~~~~~~~~~~~~~~~~~~ | GetUserDefaultUILanguage ninja: build stopped: subcommand failed.
Steps followed to build contribs manually before getting the error:

Code: Select all

$ sudo apt-get install subversion yasm cvs cmake ragel autopoint $ mkdir -p contrib/win32 $ cd contrib/win32 $ ../bootstrap --host=x86_64-w64-mingw32 $ make fetch $ make
Any help would be appreciated :D

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: cross-compiling for win32: error: ‘GetUserDefaultLocaleName’ was not declared in this scope

Postby Rémi Denis-Courmont » 01 Apr 2023 15:04

I guess you need a pretty bleeding-edge version of Mingw-w64, which Ubuntu LTS probably doesn't have.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

its_ayush_07
New Cone
New Cone
Posts: 4
Joined: 11 Feb 2023 14:12

Re: cross-compiling for win32: error: ‘GetUserDefaultLocaleName’ was not declared in this scope

Postby its_ayush_07 » 05 Apr 2023 13:33

I guess you need a pretty bleeding-edge version of Mingw-w64, which Ubuntu LTS probably doesn't have.
mingw-w64 8.0.0 is the maximum version supported in Ubuntu 22.04. Any suggestions on how to install the bleeding-edge version on Ubuntu 22.04?

chubinou
Developer
Developer
Posts: 521
Joined: 23 Jul 2015 15:19

Re: cross-compiling for win32: error: ‘GetUserDefaultLocaleName’ was not declared in this scope

Postby chubinou » 24 Apr 2023 11:38

you may use the docker image that our CI uses [1], it should contains the right version of mingw and other tools required to cross compile from linux. alternatively you may have a look at how our CI images are built [2].

Process for building on windows is documented here [3]

[1] https://code.videolan.org/videolan/vlc/ ... ci.yml#L21
[2] https://code.videolan.org/videolan/dock ... Dockerfile
[3] https://code.videolan.org/videolan/vlc/ ... D-win32.md


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 14 guests