On 10/23/2018 02:16 AM, John Mills wrote:
> I have been developing a C-language GTK+ 2.0 application for MS Windows 10 
> using mingw 
> cross-compilation on Linux, and deploying it by installing the Windows GTK+ 
> 2.0 runtime 
> bundle on the Windows machine.
> http://ftp.gnome.org/pub/gnome/binaries/win32/ 

Those are fine.

> The procedure was: on Linux development machine, unzip the gtk Windows bundle 
> in a directory 
> with the C source, set up a Makefile with the appropriate CFLAGS and LDFLAGS, 
> 'make mingw' 
> and deploy the EXE. This procedure suited my development style.

That is the 'start'. There are always additional pieces you may need to
install like any additional needed build dependencies like, e.g. gtksourcview,
libxml, etc..

When I set this up, I simply create a base /opt directory at c:\opt and then
install the various packages for gtk2 under c:\opt\gtk2. You then simply add
the the directory containing your the libraries to your PATH.

> Do I now need to port to GTK+ 3?

No, not unless you simply want to. It depends on the size of the source and
how much time you want to devote to it. I still build gtk+2 with the binaries
you are using on Win10 without issue.

> Is MSYS2 now the best/only way to deploy the dependencies to Windows?

No, not needed. Simply install the dependencies wherever you like (as my
c:\opt\gtk2) and then add the path to the libraries (e.g. c:\opt\gtk2\bin) to
your User (not system) PATH variable. You will also need the path to the
mingw\bin directory in your path as well.

Then I just open the good ole windows command prompt (cmd.exe) and build.
Remember if you are using mingw-TDM, the binaries are named, e.g. mingw32-make
(for make), etc...

I have additional mingw/gtk2/windows build information at

> Using the binaries available through MSYS2/pacman, can I still develop on 
> Linux and deploy 
> mingw executables to Windows?

You should be able to, but I have not set up the cross-compile chain on Linux
to test. I just used the windows gtk2 binaries and it works fine for my 

> Can anyone point me to a guide for doing that?

Somebody else will have to fill this in... Good luck.

David C. Rankin, J.D.,P.E.
gtk-app-devel-list mailing list

Reply via email to