Questions tagged [glib]

GLib is a general-purpose and cross-platform utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on.

GLib is a general-purpose and cross-platform utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on.

For many applications, C with GLib and GObject is an alternative to C++ with STL. It works on many UNIX-like platforms, Windows, OS/2 and BeOS. GLib is released under the GNU Library General Public License (GNU LGPL).

The GLib reference manual can be found at the GNOME developer site.

1529 questions
21
votes
3 answers

How Do I Run ./configure with MinGW?

I am looking at this webpage http://mathieu.carbou.free.fr/wiki/index.php?title=Glib_for_Win32 And it tells me I need to run the following commands. ./configure make make install How do I actually do this and where can I find these files. I have…
Logan Murphy
  • 6,120
  • 3
  • 24
  • 42
20
votes
3 answers

GLib v APR pros and cons of each

I have a couple of hobby C programming projects that I would like to start. I am looking for an open source library that has a liberal license (I want credit, but pretty much anybody can use). The library needs to have strings better than the C…
Rodney Schuler
  • 2,158
  • 4
  • 23
  • 34
20
votes
1 answer

Running multiple concurrent GMainLoops

Are users of GLib allowed to run multiple GMainLoop instances concurrently in multiple threads, with each thread running its own instance? I've found "yes" and "no" answers all over the place. I realize that this question has been asked before in…
pkurby
  • 453
  • 1
  • 3
  • 9
20
votes
5 answers

How to compile a basic D-Bus/glib example?

I'm trying to learn how to use D-Bus with C bindings. I've never used D-Bus before. I'm following this tutorial, which I assume is the official one (Freedesktop.org). I've read it until this paragraph that gives a first sample program , but…
tvuillemin
  • 1,148
  • 3
  • 10
  • 25
19
votes
6 answers

What is the recommended way of using GLib2 with CMake

Id like to use GLib in my C application which uses CMake as the build system. Now, I'm somehow confused how I should enable GLib in my CMakeLists.txt. Basically, you add libraries in cmake using the find_package command, so I tried, according to…
marmistrz
  • 5,974
  • 10
  • 42
  • 94
19
votes
1 answer

GTK: cancel timeout

GTK allows you to set a timeout with g_timeout_add. Just like g_signal_connect, the g_timeout_add function returns an id representing the timeout. So, is there a way to cancel a timeout using the id? Looking through the documentation, I don't see…
Channel72
  • 24,139
  • 32
  • 108
  • 180
17
votes
5 answers

gobject-2.0-0 not able to load on macbook

I am facing this error when I start my flask application on Python3 and Mac OS: OSError: cannot load library 'gobject-2.0-0': dlopen(gobject-2.0-0, 2): image not found. Additionally, ctypes.util.find_library() did not manage to locate a library…
17
votes
2 answers

Reassigning Smart Pointers

Generally speaking do smart pointers such as std::unique_ptr and Glib::RefPtr delete their object when reassigned to point at another object, given they are the only pointers holding that given object (obviously implied in case of std::unique_ptr)?
avicenna.x
  • 303
  • 1
  • 2
  • 9
17
votes
2 answers

Why is it better to use Glib data types (e.g. `gint` instead of `int`)?

Possible Duplicate: Why does glib redefine types? In the GTK+ 2.0 tutorial, I can read here the following statement about data types: There are a few things you probably noticed in the previous examples that need explaining. The gint, gchar,…
remjg
  • 536
  • 5
  • 16
16
votes
2 answers

How to compile & use GLib with MinGW

I want to use the Gnome GLib in a Windows environment using the free MinGW compiler to develop in C. The problem is, I have absolutely no idea how to compile this library. Would any of you please explain what tools are needed to accomplish this and…
Milan
  • 3,342
  • 3
  • 31
  • 40
16
votes
1 answer

How to upgrade gtk2hsC2hs?

I am trying cabal install glib-0.12.3 under my Ubuntu 11.10 using cabal-install 0.10.2. However, it shows the following error messages: setup: The program gtk2hsC2hs version >=0.13.5 is required but the version found at /usr/bin/gtk2hsC2hs is…
zw324
  • 26,764
  • 16
  • 85
  • 118
15
votes
1 answer

trying to import a module: undefined symbol: PyUnicodeUCS4_DecodeUTF8

import glib fails with: ImportError: /usr/lib/python2.7/dist-packages/glib/_glib.so: undefined symbol: PyUnicodeUCS4_DecodeUTF8 How can I fix this? Python version is Python 2.7.3rc2. The OS is Debian.
blues
  • 4,547
  • 3
  • 23
  • 39
14
votes
3 answers

Installing Sharp /usr/include/vips/vips8:35:25: fatal error: glib-object.h

I am trying to install sharp on Ubuntu 16.04 LTS. I originally did not have vips, so I installed sudo apt-get install libvips-dev That fixed the first error, but now I get another error that I am stuck on: In file included from…
Rachel
  • 141
  • 1
  • 1
  • 4
14
votes
1 answer

Mimicing glib.spawn_async with Popen…

The function glib.spawn_async allows you to hook three callbacks which are called on event on stdout, stderr, and on process completion. How can I mimic the same functionality with subprocess with either threads or asyncio? I am more interested in…
Sardathrion - against SE abuse
  • 17,269
  • 27
  • 101
  • 156
14
votes
5 answers

meld - gi._glib.GError: Icon 'meld-change-apply-right' not present in theme. What is wrong with the installation?

I have managed to install the meld 3.14.2 and all the dependency packages, by compiling each package from source and all are installed on a NFS share with --prefix=/meldfor the meld tool && --prefix=/meld/deps for the…
GP92
  • 433
  • 1
  • 12
  • 30