Skip to content

Tag: c++

.net core date format on Linux

I’m migrating my code from .net framework to .net core and testing it on a Linux machine, one of the issues I had a problem with is the date format when calling DateTime ToString() function, in Windows the default date format is guided by the OS and can be customized in the settings I’ve tried to …

Preserve quotes when using wordexp

I’m trying to use the wordexp function to shell-like expansion on some strings. wordexp removes single and double quotes, I would like to preserve those however. My initial though was to just surround all quotation mark pairs in the input string with another pair of, this time escaped, quotation marks w…

Does clang++ treat system headers in a more relaxed way?

The following struct is defined in the Linux system header file /usr/include/sys/inotify.h: Please note the last field name, which is a zero-length array. C++17 does not support zero-length array, so, if using struct inotify_event in a C++17 project and compiling it with -pedantic, a compiler warning should b…

GdkPixbuf change opacity

Is it somehow possible to set the opacity of a of a GdkPixbuf to about 50%? The thing is i am writing in Gtk2 (cannot switch to Gtk3!) a filebrowser widget (for a remote file transfer) and I want the icons of the files to be 50% transparent if the file is hidden. I get the icon using GFileInfo and

Jlibfprint cross compilation

I’m trying to cross-compile the JNI Bridge Jlibfprint using buildroot. This is the source code. Here is the .mk file: Extract, Patch, Update, Configure, Autoreconfiguring, Patching libtool run without problem. Then it failed at Building stage with this: Then I added, these includes to the /JlibFprint_jn…