Import AVFoundation.framework failed in Mac Sonoma
anhoder opened this issue · 2 comments
anhoder commented
package main
import (
"github.com/ebitengine/purego"
)
func main() {
_, err := purego.Dlopen("AVFoundation.framework/AVFoundation", purego.RTLD_GLOBAL)
if err != nil {
panic(err)
}
}
When I run it in Mac Sonoma(14.0), I receive the following error message:
panic: dlopen(AVFoundation.framework/AVFoundation, 0x0008): tried: 'AVFoundation.framework/AVFoundation' (no such file), '/System/Volumes/Preboot/Cryptexes/OSAVFoundation.framework/AVFoundation' (no such file), '/usr/lib/AVFoundation.framework/AVFoundation' (no such file, not in dyld cache), 'AVFoundation.framework/AVFoundation' (no such file)
goroutine 1 [running]:
main.main()
/Users/anhoder/Desktop/test/main.go:10 +0x50
exit status 2
But it worked very well in previous versions (MacOS version < 14.0)
How should I import the framework in Sonoma?
hajimehoshi commented
Use a full path. Unfortunately this is an imcompatible behavior in Xcode (hajimehoshi/ebiten#2732).
anhoder commented
OK, Thank you!