From f759fd3302d22af3d6f19d0cc4da8d995d26d817 Mon Sep 17 00:00:00 2001 From: illyum <90023277+itzilly@users.noreply.github.com> Date: Fri, 30 Aug 2024 11:48:34 -0600 Subject: [PATCH] feat(build): test enet links correctly --- client/client.cpp | 9 ++++++++- server/server.cpp | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/client/client.cpp b/client/client.cpp index 39384b0..5cfca38 100644 --- a/client/client.cpp +++ b/client/client.cpp @@ -1,6 +1,13 @@ #include +#define ENET_IMPLEMENTATION +#include int main() { printf("This is the farm fighter client!\n"); - return 0; + if (enet_initialize() != 0) { + printf("Error init enet\n"); + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; } \ No newline at end of file diff --git a/server/server.cpp b/server/server.cpp index aa7d142..6e2c6f6 100644 --- a/server/server.cpp +++ b/server/server.cpp @@ -1,8 +1,16 @@ #include +#define ENET_IMPLEMENTATION +#include int main() { printf("Server starting...\n"); + if (enet_initialize() != 0) { + printf("Error init enet\n"); + return EXIT_FAILURE; + } + printf("Press any key to exit...\n"); scanf_s("0"); - return 0; + + return EXIT_SUCCESS; } \ No newline at end of file