Compiling Windows Programs on Linux

Опубликовано: 02 Сентябрь 2026
на канале: Executive Quest
11,759
27

Fedora includes the mingw compiler, so we can port our programs to Windows (to share with our Windows friends) and we can test them on Linux using wine, so we don't actually have to boot Windows ourselves. By putting the commands into the Makefile we can remember them later.

This Makefile is a bit over-hacked. In particular, I don't recommend the $(shell basename `pwd`) for anything other than personal or hobby templates. We're not trying to pass this off as professional code or anything like that... No warranty! Just showing that anything can go into a Makefile!

The bash command line lets us make an alias for commands that we type often. We can put the alias into .bashrc and use them every time we log on. Fedora's package management commands are difficult for me to remember, so I have made aliases for them. In this video, I use an alias, rf, that is basically a command for Fedora to view the contents of packages:

alias rf='rpm -q --filesbypkg --nodigest --nosignature'

My other alias, qq is a .bashrc function:

qq() { grep -i "$@" /var/log/rpmpkgs | sed "s/\.rpm//" ; }

This just quickly lists all the rpms we installed prior to last night matching the name. It doesn't work on rpms that we recently installed because the database updates at night.

To see recently installed packages, I use another, slower command, rq, which is also an alias:

alias rq='rpm -qa --nodigest --nosignature | grep -i'

This video contains parts or visuals of free software programs. You may use them freely according to each particular license.

License for Scintilla and SciTE
http://www.scintilla.org/SciTE.html

Copyright 1998-2003 by Neil Hodgson [email protected]
All Rights Reserved

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation.

NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE

Fedora (http://fedoraproject.org) software is available under the terms of the Apache License. (http://en.wikipedia.org/wiki/Apache_L...)