How portable is GLib?
Asked Answered
Y

1

10

I know this question might sound strange because GLib is a portability library, but how portable is it? To name one example: Does GLib (including GObject) run on microcontrollers or does it depend on some kind of operating system?

Are there any limitations on where I can use GLib or will it run everywhere where it is possible to run C code?

Yours answered 30/4, 2012 at 14:1 Comment(0)
P
9

The only resource I could find on what the dependencies of GLib are is here:

Compiling the GLib package

Look in the "Dependencies" section - the non-optional dependencies seem to be:

  • A iconv function
  • A gettext function
  • A threading implementation
  • The PCRE library

This means that you will need to provide (or port) each of these to whatever the target system is (e.g. a microcontroller). Although not an insurmountable barrier, a threading implementation generally implies some form of operating system.

Also its worth noting that GLib appears to depend on a "Hosted" C environment, and so you would also need to have a standard C library ported to the target environment as well (as opposed to a "Free-standing" C environment, a subset of the standard C doesn't require that a standard C library be ported). See Hosted and Free-Standing Environments. Again this generaly implies at least a very basic form of operating system.

Propylaeum answered 30/4, 2012 at 14:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.