Skip to content

Instantly share code, notes, and snippets.

@sawaYch
Last active October 13, 2018 02:06
Show Gist options
  • Save sawaYch/68297174497eb6e252eedc4b0a762a1b to your computer and use it in GitHub Desktop.
Save sawaYch/68297174497eb6e252eedc4b0a762a1b to your computer and use it in GitHub Desktop.
MSYS2, gtkmm-3.0 config
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\open_msys2]
@="Open MSYS2 here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\open_msys2\command]
@="c:\\msys64\\usr\\bin\\mintty.exe /bin/sh -lc 'cd \"$(cygpath \"%V\")\"; exec bash'"
[HKEY_CLASSES_ROOT\Folder\shell\open_msys2]
@="Open MSYS2 here"
[HKEY_CLASSES_ROOT\Folder\shell\open_msys2\command]
@="c:\\msys64\\usr\\bin\\mintty.exe /bin/sh -lc 'cd \"$(cygpath \"%V\")\"; exec bash'"
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\open_mingw64]
@="Open mingw64 here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\open_mingw64\command]
@="c:\\msys64\\usr\\bin\\mintty.exe /bin/sh -lc 'export MSYSTEM=MINGW64;cd \"$(cygpath \"%V\")\";exec bash' --login"
[HKEY_CLASSES_ROOT\Folder\shell\open_mingw64]
@="Open mingw64 here"
[HKEY_CLASSES_ROOT\Folder\shell\open_mingw64\command]
@="c:\\msys64\\usr\\bin\\mintty.exe /bin/sh -lc 'export MSYSTEM=MINGW64;cd \"$(cygpath \"%V\")\";exec bash' --login"

Path Config

Under msys2 home/$user, open .bashrc

...
...
export PATH=/mingw64/bin:$PATH
export PKG_CONFIG_PATH=/mingw64/lib/pkgconfig

Example for compling a simple gtkmm-3.0 program

g++ -o main.exe -std=c++11 main.cc $(pkg-config gtkmm-3.0 --cflags --libs | sed 's/ -I/ -isystem /g') -mwindows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment