openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.94k stars 2.55k forks source link

[macOS] make not working due to c++23 #8111

Closed dimitre closed 3 weeks ago

dimitre commented 4 weeks ago

in macOS 14.6.1, XCode 15.4 installed we should change config.macos.default.mk, config.osx.default.mk to

MAC_OS_CPP_VER = -std=c++20

instead of

MAC_OS_CPP_VER = -std=c++23
danoli3 commented 4 weeks ago

Xcode 14 supports some C++23, Xcode 15 supports most if not all c++23 Having the setting to 23 enables C++23 features available in that development environment.

https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes

image

Clang Support:

image

https://developer.apple.com/xcode/cpp/

dimitre commented 4 weeks ago

it is failing using make

danoli3 commented 4 weeks ago

What clang version? Can you setup a test that fails, I tried a lot of macOS variants to verify before. Merge the fix until we figure it out though then

On Thu, 5 Sep 2024 at 1:40 PM, Dimitre @.***> wrote:

it is failing using make

— Reply to this email directly, view it on GitHub https://github.com/openframeworks/openFrameworks/issues/8111#issuecomment-2331300399, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGK2HENA4FB5XW7XPMVDX3ZVA7KJAVCNFSM6AAAAABNVNOCE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZRGMYDAMZZHE . You are receiving this because you commented.Message ID: @.***>

dimitre commented 4 weeks ago

do you use Clang installed via Brew? I think I'm using the original one

Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
dimitre commented 3 weeks ago

investigating further I found make template usually works because it is ending with

export MAC_OS_CPP_VER = -std=c++17

I'll propose a PR commenting out, and decreasing standard from c++23 to c++20