Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MinGW Fixes #8

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions nob.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
cmd_append(cmd, "-L./raylib/raylib-5.0_linux_amd64/lib/", "-l:libraylib.a")
#define builder_libs(cmd) \
cmd_append(cmd, "-lm")
#define builder_mingw(cmd) \
cmd_append(cmd, "-D__USE_MINGW_ANSI_STDIO")

int main(int argc, char **argv)
{
Expand All @@ -29,6 +31,7 @@ int main(int argc, char **argv)
Cmd cmd = {0};
const char *program_name = shift(argv, argc);

cmd_append(&cmd, "cc", "-Wall", "-Wextra", "-Wswitch-enum", "-ggdb", "-o", "randomart", "randomart.c", "-lm");
if (!mkdir_if_not_exists(BUILD_FOLDER)) return 1;

builder_cc(&cmd);
Expand All @@ -38,6 +41,10 @@ int main(int argc, char **argv)
builder_output(&cmd, BUILD_FOLDER"randomart");
builder_raylib_lib(&cmd);
builder_libs(&cmd);
#ifdef __MINGW32__
builder_mingw(&cmd)
#endif

if (!cmd_run_sync_and_reset(&cmd)) return 1;

if (argc > 0) {
Expand Down
4 changes: 4 additions & 0 deletions src/randomart.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#include "arena.h"
#include "ffmpeg.h"

#ifndef static_assert
#define static_assert _Static_assert
#endif

#define WIDTH 1600
#define HEIGHT 900
#define FPS 60
Expand Down