Procedure to build and generate glib and latest lib

Hi,

We are using GLib in our application(Voice mail solution) to transcode the audio data. Currently, we are using the old GLib version and we would like to update to the latest one.

For that, we need the latest GLib(2.73.3) libraries and header files for our testing. Can you please point out to the place where we can get the latest glib(2.73.3) libraries and header files.

Required libraries,
glib-2.0.lib
gobject-2.0.lib

If the libraries are not available then please provide the procedure to build and generate the libraries. we have taken the latest code from the below website, https://gitlab.gnome.org/GNOME/glib/-/releases

If the website is not correct, please point us to the correct path.

Thanks in advance,
Gokila.M

The official repository is there:
https://download.gnome.org/sources/glib/?C=M&O=A
Get the 2.73 and unpack the sources.

To build it, you just need at least a C90-compatible compiler, pkg-config (pkg-config) and also meson, as Glib uses the meson build system.

The build procedure then looks something like that:

cd glib-*
meson _build
ninja -C _build
ninja -C _build install

On Windows, with MSYS, it is much easier, but the latest version currently is 2.72.3-2

2.73 is an unstable development version. The latest stable is 2.72.3.

Thank you for the information.

Regards,
Gokila.M

Hi,

As suggested we have downloaded the Glib 2.72.3 source code. We have followed the steps provided. But we are getting errors in “ninja -C _build” as shown below.

Please advise us how to resolve this issue.

…/glib/tests/gdatetime.c(1735) : warning C4125: decimal digit terminates octal e
…/glib/tests/gdatetime.c(2349) : error C2059: syntax error : ‘.’
…/glib/tests/gdatetime.c(2354) : error C2059: syntax error : ‘.’
…/glib/tests/gdatetime.c(2359) : error C2059: syntax error : ‘.’
…/glib/tests/gdatetime.c(2364) : error C2059: syntax error : ‘.’
…/glib/tests/gdatetime.c(2456) : warning C4068: unknown pragma

Thanks in advance,
Gokila.M

The above errors are triggered by designated Initializers, a feature implemented only in C99, hence you need (at least to build the testsuite) a C99-compliant compiler. Not sure for the rest: you can try disabling the tests and see if it succeeds.

If GLib is expected to be C90 compliant, this is probably worth a bug report.

Hi,

Thanks for the response.

We are using Visual Studio 2012 CLI to build the glib 2.72.3 code. Please let us know is it compatible with C90 complaint.

Thanks in advance.

No: you need at least MSVC 2013 to get C99 compatibility, though it’s definitely better to use MSVC 2017 as that’s the version of MSVC we test in our continuous integration pipeline.

No, GLib requires a C99 toolchain: docs/toolchain-requirements.md · main · GNOME / GLib · GitLab

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.