godotengine / godot-headers

Headers for the Godot API supplied by the GDNative module.
MIT License
381 stars 91 forks source link

wchar.h file does not exists and while compilling for Mac it generates error #68

Closed JezSonic closed 3 years ago

JezSonic commented 4 years ago

In file included from simple.c:1: In file included from ../../godot_headers\gdnative_api_struct.gen.h:5: In file included from ../../godot_headers\gdnative/gdnative.h:141: ../../godot_headers\gdnative/string.h:39:10: fatal error: 'wchar.h' file not found

include

     ^

1 error generated

Command, i used: clang -std=c11 -fPIC -c -I../../godot_headers simple.c -o simple.os clang -dynamiclib simple.os -o ../bin/libsimple.dylib

I am using the newest version of Godot Headers and Godot 3.2

follower commented 4 years ago

I have wchar.h located in /usr/include/wchar.h.

You may need to install XCode or CommandLineTools which contain an SDK in order to obtain the file.

BastiaanOlij commented 3 years ago

Is this still an issue? Sounds indeed like an SDK installation problem.

akien-mga commented 3 years ago

Indeed, wchar.h should be in the default include path with a properly configured build environment. That's not Godot specific, there are likely many StackOverflow or forum topics covering how to debug and fix this for macOS.