1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
#include <iostream>
#include <sigxconfig.h>
#include <glibmm/thread.h>
#include <gtkmm/main.h>
#include "thegui.h"
#ifdef SIGC_MSC
// windows and msvc++
# if (_WIN32_WINNT >= 0x0501)
# include <winsock2.h>
# else
// must include for versions earlier than win xp
# include <Wspiapi.h>
# endif
int main(int argc, char** argv)
{
// initialization
Glib::thread_init();
WSADATA wsad = {};
// require socket library min version 1.1
WSAStartup(MAKEWORD(1, 1), &wsad);
// scope for application
{
Gtk::Main theApp(argc, argv);
TheGUI gui;
theApp.run(gui);
}
WSACleanup();
return 0;
}
#else
int main(int argc, char** argv)
{
// initialization
Glib::thread_init();
// scope for application
{
Gtk::Main theApp(argc, argv);
TheGUI gui;
theApp.run(gui);
}
return 0;
}
#endif
|