rism-digital / verovio

🎵 Music notation engraving library for MEI with MusicXML and Humdrum support and various toolkits (JavaScript, Python)
https://www.verovio.org
GNU Lesser General Public License v3.0
685 stars 185 forks source link

CocoaPod build fails #3625

Closed mbvs closed 8 months ago

mbvs commented 8 months ago

Describe the problem adding Verovio as a CocoaPod dependency to an Xcode Project fails while building

To Reproduce

/Users/marcus/Projects/NoteNinja/NoteNinja/Pods/Verovio/src/toolkit.cpp:387:31: 'codecvt_utf8' is deprecated

/Users/marcus/Projects/NoteNinja/NoteNinja/Pods/Verovio/src/toolkit.cpp:387:10: 'wstring_convert<std::codecvt_utf8, char16_t>' is deprecated

4 errors generated.

/Users/marcus/Projects/NoteNinja/NoteNinja/Pods/Verovio/src/resources.cpp:172:32: No member named 'contains' in 'std::unordered_map<char32_t, vrv::Glyph>'

/Users/marcus/Projects/NoteNinja/NoteNinja/Pods/Verovio/src/resources.cpp:177:31: No member named 'contains' in 'std::unordered_map<char32_t, vrv::Glyph>'

/Users/marcus/Projects/NoteNinja/NoteNinja/Pods/Verovio/src/resources.cpp:191:29: No member named 'contains' in 'std::unordered_map<std::string, char32_t>'

/Users/marcus/Projects/NoteNinja/NoteNinja/Pods/Verovio/src/resources.cpp:200:37: No member named 'contains' in 'std::unordered_map<char32_t, vrv::Glyph>'


I reckon this happens because std::unordered_map::contains requires C++20 and the podspec file defines `"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"` Unfortunately setting the C++ Language Dialect in the Build Settings for the Pods Project doesn't work

**Environment information (as appropriate)**
 - MacBook M1 Pro, MacOS Sonoma 14.2.1, XCode 15.3
 - Verovio 4.1.0
lpugin commented 8 months ago

Any possible relation with #3472 ?

mbvs commented 8 months ago

Any possible relation with #3472 ?

nope - the code is pulled directly from git - as configured in the podfile.

In the meantime I made a fork and changing the podspec line to "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" solved the problem as assumed.

lpugin commented 8 months ago

Fixed here https://github.com/rism-digital/verovio/commit/6a790ffacd81532a386675a70e5fd3debed6791e

mbvs commented 8 months ago

Thanks alot!