I'm using macOS Catalina (v10.15.7) to compile the following example code from gtkmm's online book:
#include <gtkmm.h>
int main(int argc, char *argv[])
{
auto app = Gtk::Application::create(argc, argv, "org.gtkmm.examples.base");
Gtk::Window window;
window.set_default_size(200, 200);
return app->run(window);
}
It compiles fine for macOS, but if I try to compile it for Windows using:
x86_64-w64-mingw32-g++ -o app.exe main.cpp -std=c++11 `pkg-config gtkmm-3.0 --cflags --libs`
Besides various warnings, I get the following errors for which I couldn't find almost any solutions on Google and Stack Overflow:
/usr/local/Cellar/glib/2.66.2_1/include/glib-2.0/gio/gcredentials.h:75:1: error: 'uid_t' does not name a type; did you mean 'pid_t'?
75 | uid_t g_credentials_get_unix_user (GCredentials *credentials,
| ^~~~~
| pid_t
/usr/local/Cellar/glib/2.66.2_1/include/glib-2.0/gio/gcredentials.h:79:52: error: 'uid_t' has not been declared
79 | uid_t uid,
| ^~~~~
/usr/local/Cellar/glibmm/2.64.5/include/giomm-2.4/giomm/credentials.h:243:3: error: 'uid_t' does not name a type; did you mean 'pid_t'?
243 | uid_t get_unix_user();
| ^~~~~
| pid_t
/usr/local/Cellar/glibmm/2.64.5/include/giomm-2.4/giomm/credentials.h:264:22: error: 'uid_t' has not been declared
264 | bool set_unix_user(uid_t uid);
| ^~~~~
Any help is much appretiated.