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
1 answer

Using glib and gtk+ to control ftdi device over USB

I am developing a simple application in C with GTK+2.0 GUI, on Linux of course, this application is designed to control a device which is connected over the USB port and is using FTDI driver to emulate RS232 asynchronious protocol over the USB…
Marek
  • 1,413
  • 2
  • 20
  • 36
0
votes
2 answers

thread for callback function in timeout_add

On which thread does the callback function gets executed after every "interval" milliseconds when we schedule a function using the following method?? def glib.timeout_add(interval, callback,…
imagin
  • 317
  • 3
  • 13
0
votes
2 answers

How can I build glib at c++ - compile error when build .cpp

All When I build cpp using g++ and glib, I meet compile error. c and gcc version is OK. I'm building at Ubuntu 10.XX. I even built it at windows - c++. How can I build glib at c++? Thanks you. #include int main() { g_printf("test"); …
jongwon.kwak
  • 143
  • 1
  • 7
0
votes
1 answer

cmake to eclipse project conversion issue

I am trying to create an eclipse project from a cmake project . I used the following command cmake -G "Eclipse CDT4 - Unix Makefiles" ./` it gives the following error CMake Error at CMakeLists.txt:119 (find_package): By not providing…
rwik
  • 775
  • 2
  • 12
  • 27
0
votes
2 answers

How do I access "named properties" in a GTK struct?

I'm trying to get a GTK-3.0-based app to build and I need to modify some code so that it uses the "master" property in a struct: https://developer.gnome.org/gdl/stable/GdlDockLayout.html#gdl-dock-layout-new I have little experience programming with…
Paul Richter
  • 6,154
  • 2
  • 20
  • 22
0
votes
2 answers

Error when attempting to call a remote method in DBus

I am trying to invoke a remote method using dbus_g_proxy_call(proxy,"myFunc",&error,G_TYPE_INVALID,G_TYPE_INVALID); but when I try this I get an error message saying "Method "myFunc" with signature "" on interface "com.myinterface.dbus" doesn't…
Revu
  • 21
  • 2
0
votes
1 answer

g_hash_table: int64 as key

I am using glib g_hash_table to create a hash table, with int64 as key and pointer as value. I tried this code but it fails: GHashTable* hash = g_hash_table_new(g_int64_hash, g_int64_equal); uint64_t mer_v = 0; exist_m = g_hash_table_lookup(hash,…
Joy
  • 9,430
  • 11
  • 44
  • 95
0
votes
1 answer

flex+bison output in a glib's hash container

I have managed considerable progress in parsing the bib file, but the next step is quite tough for my present level of understanding. I have created bison and flex code, that parses the bib file above correctly: %{ #include %} //…
BaRud
  • 3,055
  • 7
  • 41
  • 89
0
votes
1 answer

GDBus : Migrating to GDBUS and understanding the GVariants and GTypes

GVariant is opaque data structure used in the GDBUS bindings for libDBus. Its been mentioned that GVariant is a floating reference count system. What actually does a floating reference mean in this respect? Also, it is mentioned that the GVariant…
Gaurav
  • 11
  • 1
0
votes
1 answer

C CSV GLIB sort optmization

I was asked a question on a recent interview at Sevone but I never got a response on how I did. I only had 2 hours to complete the challenge and i could not get it to sort by gender. Here is what I started with, and even further below was my…
user1978109
  • 727
  • 1
  • 8
  • 19
0
votes
1 answer

Gnome N-ary Trees usage in c++

I'm trying to implement an N-ary Tree in c++ using the glib, but as I'm not a c++ expert, I'm having some problems finding out how to use it right. Does anybody have a simple example written in C++ to help me understand how to use the basic…
0
votes
1 answer

Linking glib in XCode

I have a strange issue, that may be obvious, but is really not clear for me at the moment : I'm making a Quartz Composer plugin. I have an XCode workspace based which includes a custom library. This library is compiling the poly2tri-c delaunay…
Benoît Lahoz
  • 1,270
  • 1
  • 18
  • 43
0
votes
2 answers

Compiling atk from source

I tried to compile atk 2.7.91 from source. Since I am working on an older ubuntu system there are no recent packages for the required glib version. So I just downloaded glib 2.35.8 and did successfully ./configure and make for it (I don't want to…
student
  • 1,636
  • 3
  • 29
  • 53
0
votes
2 answers

C++ Passing a long string to constructor or setter

I have a class with a Glib::ustring member (if you're not familar with it, assume it's std::string) which is expected to contain a long string, i.e. at lest one paragraph, maybe a few more. Maybe even more than 10 paragraphs. The string is planned…
0
votes
1 answer

Adding GLib to an existing application with gnu toolchain (configure, Makefile, etc.)

I've added code to an existing large application and need to make GLib a requirement, as my code relies on it. For development, I just manually edited the Makefile to add -lglib-2.0 To the LIBS= variable and -I/usr/include/glib-2.0…
JJC
  • 9,547
  • 8
  • 48
  • 53