1 #ifdef CONFIG_NATIVE_WINDOWS 2 #include <winsock.h> 3 #endif /* CONFIG_NATIVE_WINDOWS */ 4 #include <qapplication.h> 5 #include "wpagui.h" 6 7 int main( int argc, char ** argv ) 8 { 9 QApplication a( argc, argv ); 10 WpaGui w; 11 int ret; 12 13 #ifdef CONFIG_NATIVE_WINDOWS 14 WSADATA wsaData; 15 if (WSAStartup(MAKEWORD(2, 0), &wsaData)) { 16 printf("Could not find a usable WinSock.dll\n"); 17 return -1; 18 } 19 #endif /* CONFIG_NATIVE_WINDOWS */ 20 21 w.show(); 22 a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) ); 23 ret = a.exec(); 24 25 #ifdef CONFIG_NATIVE_WINDOWS 26 WSACleanup(); 27 #endif /* CONFIG_NATIVE_WINDOWS */ 28 29 return ret; 30 } 31