You shouldn't have to guess compiler flags,
pkgconf --libs --cflags benchmark
should print the correct flags (but you might need to set PKG_CONFIG_PATH
to the pkgconfig
directory of vcpkg) (or just install the library from msys2, which will put it into the default search path).