superctr / ctrmml

MML compiler
GNU General Public License v2.0
22 stars 4 forks source link

'cuchar' not found on Darwin #3

Closed OPNA2608 closed 2 years ago

OPNA2608 commented 3 years ago
clang++ -Wall --std=c++14 -g -MMD -c src/vgm.cpp -o obj/vgm.o
src/vgm.cpp:13:10: fatal error: 'cuchar' file not found
#include <cuchar>
         ^~~~~~~~
1 error generated.
make[1]: *** [Makefile:74: obj/vgm.o] Error 1

https://stackoverflow.com/a/60671901

Apple's macOS (up to and including Catalina 10.15) has neither <uchar.h> nor <threads.h>. It doesn't have the 4 functions declared in <uchar.h> or any other functions using char16_t or char32_t.

Presumably this header file unavailability extends to cuchar as well.

mmontag commented 3 years ago

Same issue here.

superctr commented 3 years ago

The code in question is here. https://github.com/superctr/ctrmml/blob/master/src/vgm.cpp#L363

I'm not going to write any MacOS specific code, since I don't own a mac.

So the only option I see is that I remove VGM tags support entirely, or someone contributes a working method.

Also, I don't understand why Mac doesn't have "uchar.h". Afaik, that is part of the C++ standard. Wouldn't the omission of that header mean that Mac's C++ implementation isn't compliant with C++11? My code is written for C++17.

mmontag commented 3 years ago

I have no idea about the macOS uchar.h business, but I posted a pull request #7.