Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco149 committed Feb 19, 2019
1 parent 560e489 commit 644ffa4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ del main.obj >nul 2>&1
cl -D_CRT_SECURE_NO_WARNINGS=1 ^
-DNOMINMAX=1 ^
-O2 -nologo -MT -Gm- -GR- -EHsc -W4 ^
main.c ^
-DOPPAI_IMPLEMENTATION ^
-DOPPAI_STATIC_HEADER ^
main.c oppai.c ^
-Feoppai.exe ^
|| EXIT /B 1
1 change: 1 addition & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <string.h>
#include <math.h>
#include <ctype.h>
#undef OPPAI_EXPORT
#undef OPPAI_IMPLEMENTATION
#include "oppai.c"

Expand Down
2 changes: 2 additions & 0 deletions oppai.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#if defined(_WIN32) && !defined(OPPAI_IMPLEMENTATION)
#ifdef OPPAI_EXPORT
#define OPPAIAPI __declspec(dllexport)
#elif defined(OPPAI_STATIC_HEADER)
#define OPPAIAPI
#else
#define OPPAIAPI __declspec(dllimport)
#endif
Expand Down

0 comments on commit 644ffa4

Please sign in to comment.