What is an "X11 platform" and can it run on windows? - x11

I'm trying to get GtkPlug and GtkSocket to work on Windows 8, using the currently supported GTK3+ windows bundle.
I see in the documentation this note:
The GtkPlug and GtkSocket widgets are only available when GTK+ is
compiled for the X11 platform and GDK_WINDOWING_X11 is defined. They
can only be used on a GdkX11Display. To use GtkPlug and GtkSocket, you
need to include the gtk/gtkx.h header.
What is an X11 platform, and can it be run on windows?

X11 is the graphics platform used by Linux and other Unix-style OSes. It is available for Windows through the Cygwin package but binaries compiled under Cygwin will not run on Windows without Cygwin installed so you probably don't want to go down that path. The documentation is essentially saying "this feature is only available on Linux."

Related

What operating systems are supported by Substrate?

I've completed the following tutorial on an Ubuntu server...
https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/setup
I then tried it on a Red Hat distro (CentOS (Red Hat 4.8.5-39)) but it failed to compile.
Prompted me to ask what OS's are supported by Substrate?
Thanks in advance :)
The Getting Started guide lists macOS (BSD), Ubuntu/Debiant, and Arch Linux as preferred distributions. It also says Windows is supported, though not preferred (due to Windows lacking a Bash-style shell by default).
That doesn't mean other distros won't work - if "it failed to compile" then your machine is missing some dependency. The platform is built using Rust (for the service) and JS+npm for the front-end GUI - so it follows that Substrate should run on any platform that Rust (and npm) will run on (i.e. every modern distro of Linux).

Installing OpenAL (or a similar package) on W7

I want to install OpenAL Haskell bindings for Windows. When I try cabal install alut I get:
Resolving dependencies...
Configuring OpenAL-1.4.0.2...
cabal: The package has a './configure' script. This requires a Unix
compatibility toolchain such as MinGW+MSYS or Cygwin.
Installing MSYS or Cygwin is absolutely not an option. runghc setup configure on the source yields the same thing. This leads me to the following:
How can I install OpenAL with just an installation of the Haskell Platform? I know mingw comes with the Haskell Platform on Windows. Can I use just that to execute this script?
Is there a package that can play audio that installs with cabal on Windows 7 AND Unix based systems?
The source contains hundreds of directives designed for the configure script, which doesn't work on Windows. Is there a version of the source which is platform specific, ie, the script has already been run in a windows environment?
Edit: Context for the problem:
I have a Haskell program, which among other things, plays sound. It is going to be used for demonstration/interactive presentation to students. The computers in the lab run Windows 7. They have the Haskell Platform installed, but not MSYS or Cygwin. I have about 45 minutes to complete this, which doesn't leave time for the installation of needlessly complex and essentially pointless software. If I could get Windows-compatible source code, I could just distribute it with the program I wrote. All the packages I need besides this one will cabal install just fine; this is also a good introduction to package management.
Edit2: cabal install fails with Cygwin installed, as does runghc setup configure

Qt - Cross-compiling on Windows for Linux

I fail to find any instructions on how to cross-compile a Qt app for linux on the windows platform. So could someone give me or link me to step-by-step instructions on how to do so.
Install distcc on your Linux machine. Choose one of the distcc compilers as the compiler Qt will use in the projects pane of Qt Creator. Setup the hosts file for distcc to point at your Windows machine and specify the number of jobs you want to send to it.
On the Windows machine, you have two options - get VirtualBox, and put the same Linux OS on that, or use Cygwin. With either of those options, you can install distcc and get it to listen for incoming tasks from your Linux machine.

getlogin_r and getutxent equivalent in mingw for windows

I am porting my old code from *ix to Windows (on mingw).
A part of the old code contains functionality which gets information about users who logged in from the terminal - using getlogin_r and getutxent functions provided at *ix.
I am not able to find equivalent in MINGW.
Can somebody please help me to find the equivalent in Mingw for windows programming?
Take a look at gnulib, it supports MinGW too (but not all modules are available there).
getutxent: not available on MinGW
("This function is missing on some platforms: Mac OS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.")
getlogin_r: available on MinGW
("Portability problems fixed by Gnulib: This function is missing on some platforms: NetBSD 3.0, Minix 3.1.8, mingw, MSVC 9.")
As an alternative you can emulate them with Win API.
How to get the username in MinGW?
LoadUserProfile function / PROFILEINFO structure
NetUserGetLocalGroups function
Windows Shell documentation

How to compile a Windows binary in Ubuntu?

I have a Qt application that I can compile in Ubuntu 10.04 64-bit and on Windows. However, I would like to avoid switching to Windows every time I want to compile the Windows version.
Is there a way I can compile a Windows Qt executable in Ubuntu with mingw32 or something?
Further, is there a way to integrate that compiler into Qt Creator?
There is a PPA (Personal Package Archive) for some people who are cross-compiling Qt and related software on Ubuntu for Windows. The PPA contains both the cross-compilers and the dependencies you will need to cross-compile Qt programs. If you look at the source packages there, I think you will be able to figure out how to configure your projects and build them.
If you most of your time spend coding with Qt on Linux (for example, Ubuntu), you may produce some experiment: install Wine, install Qt SDK for Windows with Wine and tried to build some simple project!
And if you don't like crazy things, which I wrote above, just use VirtualBox.

Resources