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
0
votes
0 answers

g_main_context_invoke And to improve the performance

There are X and Y. X is a daemon. Y is a so lib. X call the function A in Y lib. It takes long time to finish A function. So X has big problem. I want to improve it to make another thread... or etc.. (It's impossible to reduce time of A.) A is bool…
0
votes
2 answers

Setting to compile with glib, dbus lib in Eclipse

I'm making a program with glib and dbus libs. However I need to guide compile this on Eclipse. There are errors for these lines.. "Unresolved inclusion" include include What kind of options and command needed for Tool…
dipt
  • 827
  • 9
  • 14
0
votes
1 answer

How do you create an array of GList?

How do I create and access an array of GList? I tried this: GList* clist[5]; for(i = 0; i<5; i++) clist[i]=g_list_alloc(); clist[0] = g_list_append(clist[0], five); but it doesn't work, it gives me a segfault, I'm guessing i'm not…
user103052
  • 51
  • 1
  • 2
0
votes
1 answer

How to get static constructor like initialization in GObject?

I use GLib/GObject in C, and I have come in some situations where I would want something like static constructors that exist i.e. in C# and Java. A static constructor would only be run once, upon first creation of an object. What is a nice feature…
Dynalon
  • 6,577
  • 10
  • 54
  • 84
0
votes
1 answer

How to build gstreamer project using MinGW?

I've installed the following two msi on my Windows 7 (basic) 64-bit — I downloaded the msi from here. gstreamer-sdk-devel-x86_64-2013.6.msi gstreamer-sdk-x86_64-2013.6.msi Now I'm trying to build this hello world program using MinGW (GCC 4.8.1)…
Nawaz
  • 353,942
  • 115
  • 666
  • 851
0
votes
2 answers

How do I control the outbound port when sending a message via a TCP connection with a GSocket?

I am using C, Linux, and a GIO GSocket to build a small application to communicate with a digital projector via TCP. The socket connects successfully and I am able to send messages to the projector successfully. My problem is that I am not able to…
DrRocket
  • 215
  • 2
  • 14
0
votes
1 answer

Is it necessary to upgrade Glib in Cygwin?

I'm attempting to compile abiword in my Cygwin environment. I have cygwin 1.7.25. The compile fails regarding glib: libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -I/usr/include/fribidi - I/usr/include/glib-2.0…
Ken Ingram
  • 1,538
  • 5
  • 27
  • 52
0
votes
1 answer

Statically Linking glib

I'm trying to statically link glib into my C program. I'm not sure what's the best way to do this. I downloaded the code and put it in a subdirectory called glib-2.36.4. I added "-Iglib-2.36.4" when using gcc. The glib.h is in the…
user994165
  • 9,146
  • 30
  • 98
  • 165
0
votes
0 answers

Eclipse CDT, CMake and GLIB

I have a simple c file: #include int main(int argc, char *argv[]) { guchar temp = 1; GSList *list = NULL; list = g_slist_append(list, (int []){1}); } and a simple CMakeLists.txt file: PROJECT…
acarlow
  • 914
  • 1
  • 7
  • 13
0
votes
1 answer

adding struct elements to gprtarray in glib, but cannot retrieve

I'm trying to generate combinations of M integers from a set of M^2 consecutive integers, then exclude some combinations based on some (currently irrelevant) criteria, and trying to store them dynamically in memory so that I may be able to access…
0
votes
1 answer

GTK code hangs @ gtk_container_add when called from thread

AM very new to GTK and GLIB i am just trying to display a image and then call a disptext function. but when the disptextpage function is called from main directly it works but when i create a thread can call disptextpage it gets stuck in…
Ragav
  • 942
  • 4
  • 19
  • 37
0
votes
1 answer

gstreamer sample documentation code not running

Trying to compile and run a sample appsrc code after having successfully executed several tutorials. This is a documentation code, supposed it to run but ... The command used to compile gcc appGuideAppSrc.c -o appGuide `pkg-config --cflags…
user2618142
  • 1,035
  • 2
  • 18
  • 35
0
votes
2 answers

C Program Compilation issue involving Glib2 library?

I'm trying to compile the following project on a remote server. I've git cloned the project on a folder called 'scode'. The project requires glib2 and gsl libraries. Since I'm trying to compile on a remote server, I do not have sudo privileges. So I…
AnlamK
  • 1
  • 2
0
votes
3 answers

How does GPermission work?

GPermission seems to have little to no documentation. How do you actually use it? (I'm currently using it for a GTK LockButton).
Forest Katsch
  • 1,485
  • 2
  • 15
  • 26
0
votes
2 answers

gdbus-monitor - interface ``

Has the interface in the gdbus-monitor output a special meaning? What API call is required to create such a message using GDbus (g_dbus_connection_register_object does not allow to pass NULL as GDBusInterfaceInfo * and that seems to be the…
drahnr
  • 6,782
  • 5
  • 48
  • 75