Fix compilation with MinGW on Windows

Prereqs: mingw-w64-x86_64-luajit, pkg-config
This commit is contained in:
CakeLancelot 2021-05-12 20:55:40 -05:00
parent d5fc36f877
commit 9af3b60d4d
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ PROTOCOL_VERSION?=104
WIN_CC=x86_64-w64-mingw32-gcc WIN_CC=x86_64-w64-mingw32-gcc
WIN_CXX=x86_64-w64-mingw32-g++ WIN_CXX=x86_64-w64-mingw32-g++
WIN_CFLAGS=-O3 #-g3 -fsanitize=address WIN_CFLAGS=-O3 #-g3 -fsanitize=address
WIN_CXXFLAGS=-D_WIN32_WINNT=0x0601 -Wall -Wno-unknown-pragmas -std=c++17 -O3 -DPROTOCOL_VERSION=$(PROTOCOL_VERSION) -DGIT_VERSION=\"$(GIT_VERSION)\" -I./src -I./vendor #-g3 -fsanitize=address WIN_CXXFLAGS=-D_WIN32_WINNT=0x0601 -Wall -Wno-unknown-pragmas -std=c++17 -O3 -DPROTOCOL_VERSION=$(PROTOCOL_VERSION) -DGIT_VERSION=\"$(GIT_VERSION)\" -I./src -I./vendor $(LCFLAGS) #-g3 -fsanitize=address
WIN_LDFLAGS=-static -lws2_32 -lwsock32 -lsqlite3 $(LLIBFLAGS) -lstdc++fs #-g3 -fsanitize=address WIN_LDFLAGS=-static -lws2_32 -lwsock32 -lsqlite3 $(LLIBFLAGS) -lstdc++fs #-g3 -fsanitize=address
WIN_SERVER=bin/winfusion.exe WIN_SERVER=bin/winfusion.exe

View File

@ -3,7 +3,7 @@
#include "core/CNProtocol.hpp" #include "core/CNProtocol.hpp"
#include <string> #include <string>
#ifdef _WIN32 #ifdef _MSC_VER
#include <luajit/lua.hpp> #include <luajit/lua.hpp>
#else #else
#include <lua.hpp> #include <lua.hpp>