Linker error when using this library with HxGodot on Mac.
Getting the error below on Mac but it compiles/works fine on Windows. This error is produced here - addCoreFlags
However, I successfully built the MIDIReader example and it worked with an MIDI keyboard. So it looks like the problem is when grig.midi is being compiled into a static library and added to the produced shared Hxgodot library on Mac.
sample_project $ scons platform=macos target=release
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
haxe build.hxml
haxelib run hxcpp Build.xml haxe -DHXCPP_CPP11="1" -DHXCPP_GC_GENERATIONAL="1" -DHXCPP_M64="1" -Dcompiletime="2.8.0" -Dgrig.midi="0.0.10" -Dgrig.pitch="0.0.2" -Dhaxe="4.2.5" -Dhaxe3="1" -Dhaxe4="1" -Dhaxe_ver="4.205" -Dhxcpp="4.2.1" -Dhxcpp_api_level="400" -Dhxcpp_smart_strings="1" -Dhxgodot="1.0.0-alpha" -Dsource_header="Generated by Haxe 4.2.5" -Dstatic="1" -Dstatic_link="1" -Dtarget.name="cpp" -Dtarget.static="true" -Dtarget.sys="true" -Dtarget.threaded="true" -Dtarget.unicode="true" -Dtarget.utf16="true" -Dthx.core="0.44.0" -Dthx_core="1" -Dtink_core="2.0.2" -Dutf16="1" -I"/usr/local/lib/haxe/lib/grig,pitch/0,0,2/src/" -I"/usr/local/lib/haxe/lib/grig,midi/0,0,10/src/" -I"/usr/local/lib/haxe/lib/thx,core/0,44,0/src/" -I"/usr/local/lib/haxe/lib/tink_core/2,0,2/src/" -I"src/" -I"src/" -I"bindings/" -I"/usr/local/lib/haxe/lib/hxcpp/4,2,1/" -I"/usr/local/lib/haxe/lib/compiletime/2,8,0/src/" -I"/usr/local/lib/haxe/lib/hxgodot/git/src/" -I"" -I"/usr/local/lib/haxe/extraLibs/" -I"/usr/local/share/haxe/extraLibs/" -I"/usr/local/bin/extraLibs/" -I"/usr/local/lib/haxe/std/cpp/_std/" -I"/usr/local/share/haxe/std/cpp/_std/" -I"/usr/local/bin/std/cpp/_std/" -I"/usr/local/lib/haxe/std/" -I"/usr/local/share/haxe/std/" -I"/usr/local/bin/std/"
Compiling group: rtmidi-files
g++ -D__MACOSX_CORE__ -c -fvisibility=hidden -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -O2 -I/usr/local/lib/haxe/lib/hxcpp/4,2,1/include -DHX_MACOS -m64 -Wno-parentheses -Wno-unused-value -Wno-format-extra-args -Wno-overflow -DSTATIC_LINK(static) -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_GC_GENERATIONAL(haxe) -DHX_SMART_STRINGS(haxe) -DHXCPP_API_LEVEL=400(haxe) ... tags=[haxe,static]
- rtmidi.cc
- rtmidi/RtMidi.cpp
Clean: build/librtmidi.a
Link: build/librtmidi.a
Link: libHxGodot.a
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: unknown option character `W` in: -Wl,-F/Library/Frameworks
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]
/usr/local/lib/haxe/lib/grig,midi/0,0,10/src/grig/midi/cpp/rtmidi/MidiIn.hx:92: characters 16-28 : Warning : use Future.irreversible() - or better yet: new Future()
/usr/local/lib/haxe/lib/grig,midi/0,0,10/src/grig/midi/cpp/rtmidi/MidiIn.hx:107: characters 16-28 : Warning : use Future.irreversible() - or better yet: new Future()
/usr/local/lib/haxe/lib/grig,midi/0,0,10/src/grig/midi/cpp/rtmidi/MidiIn.hx:122: characters 16-28 : Warning : use Future.irreversible() - or better yet: new Future()
Error: Build failed
scons: *** [bin/libHxGodot.a] Error 1
scons: building terminated because of errors.