diff --git a/sim/wasm/ctx.c b/sim/wasm/ctx.c
index c6b02f6f92efd00623018693bffefebed77fb887..681204c4fb4c5c8c0a0d3f8b321b324f7fd88705 100644
--- a/sim/wasm/ctx.c
+++ b/sim/wasm/ctx.c
@@ -6,6 +6,8 @@
 #define CTX_PARSER 1
 #undef CTX_TILED
 
+#define STB_IMAGE_IMPLEMENTATION
+#include "stb_image.h"
 
 #define CTX_IMPLEMENTATION
 #include "ctx.h"