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

Missing <string.h> include causes compilation error #162

Open
Diegovsky opened this issue Jun 24, 2024 · 1 comment
Open

Missing <string.h> include causes compilation error #162

Diegovsky opened this issue Jun 24, 2024 · 1 comment

Comments

@Diegovsky
Copy link

Compiling on Arch Linux, commit 1bd147d, I get the following error:

/home/diegovsky/Downloads/GBARunner3/code/core/arm9/source/Fat/ff.c:684:9: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
  684 |         memset(dst, val, cnt);
 

I'm not sure if on Windows it is imported/defined automatically, but I hackedfixed it by including <string.h> in the common.h file for both processors:

--- a/code/core/arm7/source/common.h
+++ b/code/core/arm7/source/common.h
@@ -1,2 +1,3 @@
 #pragma once
+#include <string.h>
 #include <nds.h>
diff --git a/code/core/arm9/source/common.h b/code/core/arm9/source/common.h
index 5e10188..fdad709 100644
--- a/code/core/arm9/source/common.h
+++ b/code/core/arm9/source/common.h
@@ -1,5 +1,6 @@
 #pragma once
 #include <nds/ndstypes.h>
+#include <string.h>
 #include <stddef.h>
 
 typedef u16 bool16;
 
@real-F-00
Copy link

i can confirm the same thing happens on Windows 10. i have to note that i have installed MSYS2 and the Wonderful Toolchain from BlocksDS and i don't know if that's interfering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants