Compiles, links and runs (functionality not tested)
This commit is contained in:
parent
04723a289b
commit
6a97c0447a
48 changed files with 224 additions and 149 deletions
|
|
@ -1,12 +1,15 @@
|
|||
#include "MasterController.h"
|
||||
#include <QApplication>
|
||||
#include <winsock2.h>
|
||||
#ifdef _WIN32
|
||||
# include <winsock2.h>
|
||||
#endif
|
||||
#include <memory>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
/* Use the MAKEWORD(lowbyte, highbyte) macro declared in Windef.h */
|
||||
#ifdef _WIN32
|
||||
WORD wVersionRequested = MAKEWORD(2, 2);
|
||||
WSADATA wsaData;
|
||||
int err = WSAStartup(wVersionRequested, &wsaData);
|
||||
|
|
@ -16,7 +19,7 @@ int main(int argc, char *argv[])
|
|||
printf("WSAStartup failed with error: %d\n", err);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
QApplication a(argc, argv);
|
||||
|
||||
QCoreApplication::setOrganizationName("pglab");
|
||||
|
|
@ -26,8 +29,9 @@ int main(int argc, char *argv[])
|
|||
auto master_controller = std::make_unique<MasterController>();
|
||||
master_controller->init();
|
||||
int result = a.exec();
|
||||
#ifdef _WIN32
|
||||
WSACleanup();
|
||||
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue