emscripten-core / emscripten-core/emscripten

'CoreMIDI/CoreMIDI.h' file not found

Open
#15,119 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I'm trying to port [rtMidi](https://github.com/thestk/rtmidi) to WebAssembly, it compile just fine when using the dummy version but when asking to compile with MACOSX_CORE flag the compiler is not able to find CoreMidi I get

rtmidi/RtMidi.h:642:10: fatal error: 'CoreMIDI/CoreMIDI.h' file not found

I've ran
`emcc -O3 -s WASM=1 -s --bind -I rtmidi rtmidi/RtMidi.cpp rtmidi/rtmidi_c.cpp -s ASSERTIONS=1 -D__MACOSX_CORE__` on a mac

the include is as follow `#include `.

The `clang` installed with XCode Command Line Tool normally finds it as it is linked to the correct file system Path. `emcc` is not linked to this include path and cannot find it.

running `$emcc -v` gives me the following output:

```
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 2.0.30 (f782b50a7f8dded7cd0e2c7ee4fed41ab743f5c0)
clang version 14.0.0 (https://github.com/llvm/llvm-project c4048d8f50aaf2c4c13b8d3e138abc34a22da754)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /Users/vv/Documents/Techs/emsdk/emsdk/upstream/bin
```

where running `g++ -v` gives me this output:

```
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
```
and I'm on BigSur 11.5.2 on a mac mini m1

Thnaks in advance

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.