3 Here's a step by step from a clean install to successfully setup MinGW and build
4 libusb-1.0 and stlink for MS Windows. Hopefully this helps someone.
6 1. Install MinGW and MSYS to C:\MinGW with the graphical installer from
7 http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download
8 and add these packages:
10 mingw-developer-toolkit
12 2. Add C:\MinGW\bin to your path.
14 3. Create the C:\MinGW\msys\1.0\etc\fstab file to mount C:\MinGW as /mingw as per
15 http://www.mingw.org/wiki/MSYS:
17 #Win32_Path Mount_Point
20 4. Download these three glib, pkg-config, pkg-config-dev archives and extract
22 http://win32builder.gnome.org/packages/3.6/glib_2.34.3-1_win32.zip
23 http://win32builder.gnome.org/packages/3.6/pkg-config_0.28-1_win32.zip
24 http://win32builder.gnome.org/packages/3.6/pkg-config-dev_0.28-1_win32.zip
26 5. Download latest libusb-1.0 source from git://git.libusb.org/libusb.git and
27 build (prefix as per http://www.mingw.org/wiki/MSYS)
30 ./configure --prefix=/mingw
34 6. Repeat for stlink source from https://github.com/texane/stlink
37 ./configure --prefix=/mingw
41 7. Enjoy the fruits of the stlink developers.