Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
g++ main.cpp `pkg-config --cflags --libs gtkmm-2.4`
But I can't:
g++ `pkg-config --cflags --libs gtkmm-2.4` main.cpp
This is frustating, because NetBeans use second one.
Then this is a bug in NetBeans build system, so you need to report it to them.
The second form of the command, as you've stated it, is definitively invalid; specifications for libraries *must* come *after* the source or object files which refer to them. Thus, putting the source file name at the end of the command is *always* wrong, if that source needs to resolve symbols from a library. Traditionally, the CFLAGS spec would be placed *before* the sources, so the definitively correct command format would be:
$ g++ `pkg-config --cflags` main.cpp `pkg-config --libs gtkmm-2.4`
This is *not* a MinGW bug.