glib

Running multiple concurrent GMainLoops

孤者浪人 提交于 2019-12-03 02:16:16
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 this very forum (December 2011) . However, I am able to run two GMainLoop instances at the same time without apparent issue. My test code is very simple: Create a GMainLoop in main() Create a timeout source for the default context and the main loop using g_timeout_add Create a GThread in main() Run the main loop using g_main_loop_run [THREAD CONTEXT]:

GLib-GIO-ERROR**: No GSettings schemas are installed on the system

匿名 (未验证) 提交于 2019-12-03 01:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Unfortunately, I am using Windows (Windows7 x64). With MinGW compiler in Code::Blocks and GTK+3.6.4. I compiled manually all the schemas from glib. When I use File Chooser dialogue / colorpicker - it doesn't matter, I am getting the following error: GLib-GIO-ERROR**: No GSettings schemas are installed on the system and the program terminates. What do I have to do to fix this? 回答1: GSettings looks at the compiled schemas in the directories pointed by the $XDG_DATA_DIR environment variable. You can either use a launcher script that sets up the

Why can't I build a “hello world” for glib?

余生长醉 提交于 2019-12-03 01:50:56
问题 So here's the world's simplest glib program: #include <glib.h> I try to compile it with gcc test.c and I get: test.c:1:18: error: glib.h: No such file or directory So I make sure that I have the right packages: # dpkg -l | grep libglib ii libglib-perl 1:1.183-1 Perl interface to the GLib and GObject libra ii libglib1.2-dev 1.2.10-19build1 The GLib library of C routines (development) ii libglib1.2ldbl 1.2.10-19build1 The GLib library of C routines ii libglib2.0-0 2.20.1-0ubuntu2 The GLib

How Do I Run ./configure with MinGW?

我是研究僧i 提交于 2019-12-03 00:37:34
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 MinGW and Mysys installed in my C drive. On Windows there is 2 ways to achieve this if you have MinGW installed you also have to install msys for MinGW some MinGW installations already come pre-installed with msys to check go to your MinGW folder and see if you have a msys folder inside there. Second make sure the path inside the Environment Variables

Material to learn GObject and Glib [closed]

拥有回忆 提交于 2019-12-03 00:18:59
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I am comfortable with C. but need to learn GObject and Glib for gstreamer . All i found on net is Gobject reference manual. Its good but looking for tutorial for Gobject/Glib as the main focus is on gstreamer. So pls share any other resources to learn the glib and gobject. 回答1: Start with Glib, its quite easy

shadow――安装篇

匿名 (未验证) 提交于 2019-12-02 23:59:01
shadow,一款开源的网络模拟器。似乎只是作者的个人项目,坑有点多,记录一下安装过程,踩到的坑,也有一些新的学到的东西。 shadow的维护感觉不太好,很多wiki教程不太清楚,很多包太吃版本。 首先po出项目地址: shadow/shadow 。 本次安装在Ubuntu desktop 18.04TSL,VMware Workstation 15.1。 在安装之前,首先声明一个坑:本来我在安装的时候使用的是之前开发了其他项目的环境,在某个包编译中一直出错,这个错误看起来正常情况下根本不会出现。 描述一下这个错误,大概是项目中自定义的一些方法在其他一些文件中无法被链接,但另一些文件可以。 无奈之下,我抛弃了原先的开发环境,转而安装了全新的系统。这次并未出现这个问题。 参照 这里 ,这个没什么问题,直接按照它的来就可以了。 提醒一下,最好使用官方默认源。一些包在换了源之后会有一些问题。 居多坑。有些版本他给的也不太行。安装使用 README ,不要使用其他教程,有冲突。这个README是最新的。 请一定看完这里的注意事项再开始动手,否则可能走冤枉路! 使用最新的仓库代码,而不要使用release版本;release版本的 CMakeList 不对劲,无法正常生成 MakeFile 文件。 下载release版本,把其中的 src 文件夹复制到 master 代码中去;

glibconfig.h no such file or directory

蹲街弑〆低调 提交于 2019-12-02 18:49:50
I just installed glib in Raspbian(Debian version). I want to read a config file using glib. I am trying to write a C application in Codeblocks and I use the header #include <glib.h> But I have an error in gtypes.h fatal error:glibconfig.h No such file or directory I used this path project->Build Options->Compiler Settings->Other Options and I added -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include as I read in this tutorial. I have to declare also -L/usr/lib -lm -lglib-2.0 as the tutorial says and if yes then where and how can I declare it in Codeblocks? Use pkg-config . gcc `pkg-config -

Sublime Text on Ubuntu 14.04 - Keeps attempting to remove it

妖精的绣舞 提交于 2019-12-02 17:53:48
Sublime & from Terminal, opens a Sublime Text window, but keep getting this message: (sublime: 6476): GLib-CRITICAL **; Source ID 1982 was not found when attempting to remove it. The Source ID keeps changing. Using Ubuntu 14.04. Any ideas what could be going on? Thanks! This page in Ubuntu's bug tracker describes this particular situation. Apparently this is a known bug with 14.04, possibly because of a regression with GLib, or a mismatch between GLib and GTK (so says one of the commenters). Nothing is trying to remove Sublime, it's just an error in a programming library. If nothing is

Regex using Vala and GLib

不想你离开。 提交于 2019-12-02 15:16:29
问题 Is there a function, something like http://php.net/manual/en/function.preg-match-all.php ? Using GLib http://references.valadoc.org/#!api=glib-2.0/GLib.MatchInfo, all i'v found is : public bool match_all_full (string str, ssize_t string_len = -1, int start_position = 0, RegexMatchFlags match_options = 0, out MatchInfo match_info = null) throws RegexError Using the standard algorithm for regular expression matching only the longest match in the string is retrieved, it is not possible to obtain