You can use Markdown to prevent Discourse from formatting what you type. I put a Markdown “code fence” around most of your quote. Therefore, only the last line is formatted.
Either my eyesight is bad, or you typed the command perfectly. It should have worked! So, let’s compare your MSys2 with mine.
I typed the following commands:
Gregory MINGW64 /tmp
$ type gcc
gcc is /mingw64/bin/gcc
Gregory MINGW64 /tmp
$ pkg-config --cflags gtk+-3.0
-IC:/msys64/mingw64/include/gtk-3.0 -IC:/msys64/mingw64/include/pango-1.0 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include/libpng16 -mms-bitfields -IC:/msys64/mingw64/include/fribidi -IC:/msys64/mingw64/include/cairo -IC:/msys64/mingw64/include/lzo -IC:/msys64/mingw64/include/pixman-1 -mms-bitfields -mms-bitfields -mms-bitfields -mms-bitfields -mms-bitfields -mms-bitfields -mms-bitfields -IC:/msys64/mingw64/include/gdk-pixbuf-2.0 -mms-bitfields -mms-bitfields -mms-bitfields -IC:/msys64/mingw64/include/atk-1.0 -mms-bitfields -mms-bitfields -mms-bitfields -pthread -mms-bitfields
Gregory MINGW64 /tmp
$ ls /mingw64/include/gtk-3.0
gdk/ gtk/
Gregory MINGW64 /tmp
$ ls /mingw64/include/gtk-3.0/gtk
a11y/ gtkcelleditable.h gtkentrybuffer.h gtkgrid.h gtkorientable.h gtksearchentry.h gtktexttag.h
deprecated/ gtkcelllayout.h gtkentrycompletion.h gtkheaderbar.h gtkoverlay.h gtkselection.h gtktexttagtable.h
gtk.h gtkcellrenderer.h gtkenums.h gtkicontheme.h gtkpadcontroller.h gtkseparator.h gtktextview.h
gtk-a11y.h gtkcellrendereraccel.h gtkeventbox.h gtkiconview.h gtkpagesetup.h gtkseparatormenuitem.h gtktogglebutton.h
gtkaboutdialog.h gtkcellrenderercombo.h gtkeventcontroller.h gtkimage.h gtkpaned.h gtkseparatortoolitem.h gtktoggletoolbutton.h
gtkaccelgroup.h gtkcellrendererpixbuf.h gtkeventcontrollerkey.h gtkimcontext.h gtkpapersize.h gtksettings.h gtktoolbar.h
gtkaccellabel.h gtkcellrendererprogress.h gtkeventcontrollermotion.h gtkimcontextinfo.h gtkplacessidebar.h gtkshortcutlabel.h gtktoolbutton.h
gtkaccelmap.h gtkcellrendererspin.h gtkeventcontrollerscroll.h gtkimcontextsimple.h gtkplug.h gtkshortcutsgroup.h gtktoolitem.h
gtkaccessible.h gtkcellrendererspinner.h gtkexpander.h gtkimmodule.h gtkpopover.h gtkshortcutssection.h gtktoolitemgroup.h
gtkactionable.h gtkcellrenderertext.h gtkfilechooser.h gtkimmulticontext.h gtkpopovermenu.h gtkshortcutsshortcut.h gtktoolpalette.h
gtkactionbar.h gtkcellrenderertoggle.h gtkfilechooserbutton.h gtkinfobar.h gtkprintcontext.h gtkshortcutswindow.h gtktoolshell.h
gtkadjustment.h gtkcellview.h gtkfilechooserdialog.h gtkinvisible.h gtkprintoperation.h gtkshow.h gtktooltip.h
gtkappchooser.h gtkcheckbutton.h gtkfilechoosernative.h gtklabel.h gtkprintoperationpreview.h gtksizegroup.h gtktreednd.h
gtkappchooserbutton.h gtkcheckmenuitem.h gtkfilechooserwidget.h gtklayout.h gtkprintsettings.h gtksizerequest.h gtktreemodel.h
gtkappchooserdialog.h gtkclipboard.h gtkfilefilter.h gtklevelbar.h gtkprogressbar.h gtksocket.h gtktreemodelfilter.h
gtkappchooserwidget.h gtkcolorbutton.h gtkfixed.h gtklinkbutton.h gtkradiobutton.h gtkspinbutton.h gtktreemodelsort.h
gtkapplication.h gtkcolorchooser.h gtkflowbox.h gtklistbox.h gtkradiomenuitem.h gtkspinner.h gtktreeselection.h
gtkapplicationwindow.h gtkcolorchooserdialog.h gtkfontbutton.h gtkliststore.h gtkradiotoolbutton.h gtkstack.h gtktreesortable.h
gtkaspectframe.h gtkcolorchooserwidget.h gtkfontchooser.h gtklockbutton.h gtkrange.h gtkstacksidebar.h gtktreestore.h
gtkassistant.h gtkcolorutils.h gtkfontchooserdialog.h gtkmain.h gtkrecentchooser.h gtkstackswitcher.h gtktreeview.h
gtk-autocleanups.h gtkcombobox.h gtkfontchooserwidget.h gtkmenu.h gtkrecentchooserdialog.h gtkstatusbar.h gtktreeviewcolumn.h
gtkbbox.h gtkcomboboxtext.h gtkframe.h gtkmenubar.h gtkrecentchoosermenu.h gtkstylecontext.h gtktypebuiltins.h
gtkbin.h gtkcontainer.h gtkgesture.h gtkmenubutton.h gtkrecentchooserwidget.h gtkstyleprovider.h gtktypes.h
gtkbindings.h gtkcssprovider.h gtkgesturedrag.h gtkmenuitem.h gtkrecentfilter.h gtkswitch.h gtkversion.h
gtkborder.h gtkcsssection.h gtkgesturelongpress.h gtkmenushell.h gtkrecentmanager.h gtktestutils.h gtkviewport.h
gtkbox.h gtkdebug.h gtkgesturemultipress.h gtkmenutoolbutton.h gtkrender.h gtktextattributes.h gtkvolumebutton.h
gtkbuildable.h gtkdialog.h gtkgesturepan.h gtkmessagedialog.h gtkrevealer.h gtktextbuffer.h gtkwidget.h
gtkbuilder.h gtkdnd.h gtkgesturerotate.h gtkmodelbutton.h gtkscale.h gtktextbufferrichtext.h gtkwidgetpath.h
gtkbutton.h gtkdragdest.h gtkgesturesingle.h gtkmodules.h gtkscalebutton.h gtktextchild.h gtkwindow.h
gtkcalendar.h gtkdragsource.h gtkgesturestylus.h gtkmountoperation.h gtkscrollable.h gtktextdisplay.h gtkwindowgroup.h
gtkcellarea.h gtkdrawingarea.h gtkgestureswipe.h gtknativedialog.h gtkscrollbar.h gtktextiter.h gtkx.h
gtkcellareabox.h gtkeditable.h gtkgesturezoom.h gtknotebook.h gtkscrolledwindow.h gtktextlayout.h gtkx-autocleanups.h
gtkcellareacontext.h gtkentry.h gtkglarea.h gtkoffscreenwindow.h gtksearchbar.h gtktextmark.h
The first gcc flag that pkg-config shows is the Windows path to that header. I confirmed that the file exists by listing that (MSys) path. Then, I listed the path in the #include <gtk/gtk.h>
line. The header is the first file in the directory listing.
Please type the four commands that I typed. See if your output matches mine.