glib

Including glib.h in a CMake project

会有一股神秘感。 提交于 2019-11-30 04:51:20
问题 Trying to compile a library in Ubuntu with CMake and one of the file includes glib.h. The package is installed and glib.h is in /usr/include/glib-2.0/glib.h . I added the following but compiler still cannot find glib.h. FIND_PACKAGE(glib-2.0) IF (glib-2.0_FOUND) INCLUDE_DIRECTORIES(${glib-2.0_INCLUDE_DIR}) ENDIF() Anyone know what package I are suppose to look for? Actual code that I ended up using is find_package(PkgConfig REQUIRED) pkg_check_modules(GLIB_PKG glib-2.0) if (GLIB_PKG_FOUND)

How to fix error “GLib-GIO-ERROR**: No GSettings schemas are installed on the system”?

半世苍凉 提交于 2019-11-29 16:44:09
I have to create a one-file (.exe) program with InstallShield2015LimitedEdition that works with GTK3.4.2 and OpenCV 3.0.0 in Windows 7 x64 . In this program the user can choose a directory from their computer. But when I invoke FileChooser (click on executable) I get this error: GLib-GIO-ERROR**: No GSettings schemas are installed on the system and the program terminates. I visited these pages: Glib-GIO-ERROR when opening an file chooser dialog GLib-GIO-ERROR**: No GSettings schemas are installed on the system How deal with FileChooser in GTK with static compilation But I never understood

Compile a simple program on ubuntu arm

夙愿已清 提交于 2019-11-29 15:52:15
I have a simple program #include <glib.h> int main(){ g_print("hallo\n"); } and try to compile it on the embedded system (Odroid X2) with Ubuntu like that root@odroid:~/# gcc $(pkg-config --libs --cflags glib-2.0) -o main main.c /tmp/cci48ASK.o: In function `main': main.c:(.text+0xc): undefined reference to `g_print' collect2: error: ld returned 1 exit status Installed compiler: root@odroid:~/x# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.7/lto-wrapper Target: arm-linux-gnueabihf Configured with: ../src/configure -v --with-pkgversion=

vs2015编译GLib2-5.7

我是研究僧i 提交于 2019-11-29 10:19:58
编译glib2.57,一共要编译glib,gio,gmodule,gobject,gthread五个模块 首先1】 将config.h.win32更改名字为config.h 将glibconfig.h.win32更改名字为glibconfig.h 其实编译时他们也会会生成config.h和glibconfig.h。 记得删掉移除掉config.h.win32和glibconfig.h.win32,然后添加头文件config.h和glibconfig.h 其次2】 添加以下的库头文件目录和链接库目录,和链接库名称: libintl库(该库依赖libiconv) libffi 库: pcre 库:主要是要注意添加预处理器定义 zlib 库: 1】、 1>..\..\glib\gversion.c(144): error C2065: “GLIB_INTERFACE_AGE”: 未声明的标识符 1>..\..\glib\gversion.c(144): error C2099: 初始值设定项不是常量 1>..\..\glib\gversion.c(145): error C2065: “GLIB_BINARY_AGE”: 未声明的标识符 1>..\..\glib\gversion.c(145): error C2099: 初始值设定项不是常量 1>..\..\glib\gversion

trying to import a module: undefined symbol: PyUnicodeUCS4_DecodeUTF8

笑着哭i 提交于 2019-11-28 11:59:06
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. Ignacio Vazquez-Abrams The module was built against a Python that was built with UCS-4 as its internal unicode representation. Your Python was built with UCS-2 as its internal representation. Rebuild the module, or rebuild Python. This issue is mentioned in the official FAQ . This is discussed in-depth in python issue 8654 . 来源: https://stackoverflow.com/questions/16871799/trying-to-import-a

How to fix error “GLib-GIO-ERROR**: No GSettings schemas are installed on the system”?

折月煮酒 提交于 2019-11-28 11:26:55
问题 I have to create a one-file (.exe) program with InstallShield2015LimitedEdition that works with GTK3.4.2 and OpenCV 3.0.0 in Windows 7 x64 . In this program the user can choose a directory from their computer. But when I invoke FileChooser (click on executable) I get this error: GLib-GIO-ERROR**: No GSettings schemas are installed on the system and the program terminates. I visited these pages: Glib-GIO-ERROR when opening an file chooser dialog GLib-GIO-ERROR**: No GSettings schemas are

Why does GLib redefine types?

99封情书 提交于 2019-11-28 10:57:53
What is the reasoning behind types to be redefined in GLib? Why do they turn char into gchar , int into gint , etc.? Josh Lee Check out Basic Types in the GLib documentation. Essentially, it's to guarantee that certain types will exist with certain semantics, regardless of which C compiler or platform you're using. The types that C guarantees anyway are typedef ed just to make all of the type names look uniform. 来源: https://stackoverflow.com/questions/1819561/why-does-glib-redefine-types

Compile a simple program on ubuntu arm

半腔热情 提交于 2019-11-28 10:02:46
问题 I have a simple program #include <glib.h> int main(){ g_print("hallo\n"); } and try to compile it on the embedded system (Odroid X2) with Ubuntu like that root@odroid:~/# gcc $(pkg-config --libs --cflags glib-2.0) -o main main.c /tmp/cci48ASK.o: In function `main': main.c:(.text+0xc): undefined reference to `g_print' collect2: error: ld returned 1 exit status Installed compiler: root@odroid:~/x# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf

GTK window with Quartz [starting from an issue with GStreamer]

筅森魡賤 提交于 2019-11-28 08:21:12
问题 I'm trying to get basic-tutorial-5 of the GStreamer SDK to work on OSX. SDK downloaded from http://gstreamer.freedesktop.org/data/pkg/osx/1.2.4.1/ tutorials (for 1.0) from http://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/ I get the following error basic-tutorial-5.c:5:10: fatal error: 'gst/video/videooverlay.h' file not found when I run gcc `pkg-config gstreamer-1.0 gtk+-3.0 --cflags --libs` basic-tutorial-5.c -o basic5 Any pointers would be helpful! Thanks. EDIT: There is a gst/video

Valgrind reports memory 'possibly lost' when using glib data types

只愿长相守 提交于 2019-11-28 05:53:15
I'm developing a library using a number of glib datastructures (GHashTable, GSList etc.). I've been checking my code frequently for memory leaks using valgrind. Most of the issues valgrind points out are quite easy to fix, however there's a few that I can't figure out. All of these are reported as 'possibly lost'. At the top of the valgrind stacktrace, I always find the same 4 libraries: ==29997== 1,512 bytes in 3 blocks are possibly lost in loss record 24 of 25 ==29997== at 0x4004B11: memalign (vg_replace_malloc.c:532) ==29997== by 0x4004B6B: posix_memalign (vg_replace_malloc.c:660) ==29997==