May I use latest pygobject for gtk2 with gobject introspection on windows? - glib

I want my gtk2+python environment (on windows) support gobject instrospection.
It's all about glib, gobject introspection and pygobject libraries.
May I just replace the glib and related libraries to latest version?
I have downloaded some precompiled version of glib but the programs using old glib could not start anymore.

I have had some success in the past using GTK 2 with GObject Introspection (on Linux), but it was unreliable. Don't do it.
There are official binaries of GTK 3 available for Windows, but you'll likely have to compile GObject Introspection yourself.

Related

mingw : Giving reference to opencv libraries in simpler way

Successfully installed opencv 4.5.4 in windows under mingw evironment. I was able to compile opencv applications. But is there any easy way to give reference to libraries instead of typing long list of opencv libraries (i.e. something like pkg-config in windows)
For a simple opencv program I need to give reference to 4 libraries.
g++ rotate.cpp -lopencv_core454 -lopencv_highgui454 -lopencv_imgproc454 -lopencv_imgcodecs454
instead do we have some option to give list of libraries through some flags in windows environment.
Thanks
You can actually use pkg-config in Windows. If you use MSYS2 shell is is usually available or it can be installed via pacman.

Can I use OpenCV on AIX?

I developed an image processing library with OpenCV and it works well in Windows, Android(Native) and iOS.
Now I want to build my library to run on AIX server. Unfortunately I couldn't find any guidance for building OpenCV for AIX.
Can you give me any guidance?
There is no official support for OpenCV on AIX. No community driven project either.
However there is another project maintained by IBM called IBM AIX Toolbox for Linux Applications.
This project is intended for developers and provides most Linux based, especially GNU based programming languages, tools & libraries to be run on AIX.
You'll have to go through setting up the environment / dependencies, though it must compile just fine. Linux tutorials for building OpenCV using GCC should work just fine.
You might ask the person at Perzl if he could build it. He must have a lot of knowledge, tools, and environment already. I also find it much better than the IBM AIX Toolbox so if you want to try to do it yourself, I would start with his versions instead of IBM's.
Group Bull use to have a similar set of built open source packages but I don't know where they disappeared to.

Vala/Genie builds for Win/Mac?

Is the Vala/Genie compiler available on the Windows and Mac OS X platforms? I know that it is possible to use GLib and GTK on Windows and Mac OS X, but there are no official downloads of Vala for either platform.
Vala 0.28 is currently available on Mac OS X in just the same way as the rest of the GLib/GTK platform is. Here are the official instructions for setting up a GLib/GTK development environment on Mac OS X. To build the Vala/Genie compiler, run jhbuild build vala after completing those instructions.
I don't know the answer for Windows.
There are no "official" builds of Vala as such. Vala is officially released as source code only. The source is then built by various distributors who package and distribute the builds.
On Linux this is done by distributions like Fedora and Ubuntu. On Mac OS X probably the most relevant is Brew and on Windows MSYS2. For more details on all of these ways see the Installing Vala section of the Vala wiki.
There are several ways of getting Vala compiler to work on Windows. The easiest solution would be installing MSYS2 which always provides fresh version of vala as one of it's packages.

Is Clang as (or more) portable than gcc for C++?

Suppose I have a C++ project, and I compile it with gcc and with clang. You can assume that the gcc compiled version runs in another linux machine. Will this imply (in normal circumstances) that the clang version will also run on the other linux machine?
Clang binraries are as portable as gcc binaries are, as long as you are linking to the same libraries and you aren't passing flags like -march=native to the compiler.
Clang has one huge advantage over gcc, it can deal with alsmost all libstdc++ versions,
while gcc is bound to its bundled version and often can't parse any older versions.
So the following often happens in production environments:
Install an LTS distro (Ubuntu 12.04 for example)
Keep gcc, glibc and libstdc++ untouched
Install a recent clang version for C++11, etc
Build the release binaries with clang
So (in my specific example) those binaries will work on all
distros with libstdc++ >= 4.6 and glibc >= 2.15.
This may be an interesting read for you.
If the program is a simple Hello world, it should work on the other machine when compiled through Clang.
But when the program is a real program with a lot a lines and compilation units, and calls to many external libs everything is possible depending on the program itself and the compilation options :
hardware requirements (memory) being different (mainly depends on compilation options)
use of different (versions of) libraries between gcc and clang
UB giving expected results in one and not in the other
different usages for implementation defined rules
use of gcc extensions not accepted by clang
For all of the above except 2 first, it should run on other machines it it runs on one
linux programs depend on their build environment. If your glibc version or kernel is different there will be lots of possibilities that the executable will not be able to run. You could use the interpreter language of llvm though, it compiles into bytecode which can be interpreted on various operating systems.
The answer is, well, depends.
The first hard requirement is the same CPU architecture. 64 Bit is not enough of a qualifier. If you compile of x64 you won't have much success running it on 64-Bit ARM.
The next big one is libraries. If you use any libraries in the program, the target system needs to have those libraries. This includes the kernel headers. So if you compile for e.g. a current kernel version, using the most cutting-edge features, then you will have no joy running that program on a very old version of Linux.
The last one is hardware dependencies. If you create a program that e.g. requires 4 GB of RAM and then try to run it on a small embedded device with 256 MB RAM, that won't work either.
To fit better to your changed question: From my experience there shouldn't be much of a difference in portability between Clang and gcc. Also googling didn't turn up anything, so it should basically work. But better always test stuff like that before you publish some binary in production.

clang-3.4 binary for mingw32

I was wondering if there is a pre-built clang-3.4 (stable-release) binary for mingw32 (www.mingw.org) for download? I do not want to use the VS version b/c I only use gcc and I don't want future compatibility issues (such as VS compiled opencv shared libraries crashing mingw/gcc compiled applications).
I checked http://llvm.org/releases/download.html. They had "Experimental Clang Binaries for Mingw32/x86" for 3.3 and 3.2, but not for the new 3.4 release.
Thanks,

Resources