darlinghq / darling

Darwin/macOS emulation layer for Linux
http://www.darlinghq.org
GNU General Public License v3.0
11.45k stars 445 forks source link

Some GUI APIs issues #444

Closed woachk closed 5 years ago

woachk commented 6 years ago

Darling [/Volumes/SystemRoot/home/laptop2/test/hellococoa]$ swift test.swift objc[297]: Class CIContext is implemented in both /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (0x7fffed42a590) and /System/Library/Frameworks/CoreImage.framework/CoreImage (0x7fffe6d84330). One of the two will be used. Which one is undefined. Assertion failed: (isRealized()), function isMetaClass, file /root/rpmbuild/BUILD/darling/src/external/objc4/runtime/objc-runtime-new.h, line 1221. Stack dump:

  1. Program arguments: /Library/Developer/CommandLineTools/usr/bin/swift -frontend -interpret test.swift -enable-objc-interop -sdk /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -color-diagnostics -module-name test Abort trap: 6 with the AppKit example at https://www.objc.io/blog/2018/10/02/using-appkit-from-the-command-line/.

I didn't expect it to work, but not to do this too...

bugaevc commented 6 years ago

Cocoa is absolutely not yet officially supported — but thanks, I'll look into it, the program is simple enough it might actually work with what we have now.

bugaevc commented 5 years ago

With https://github.com/darlinghq/darling-foundation/commit/0b9e70d83a95ac493527790ac96215c85fb3a90d, https://github.com/darlinghq/darling-foundation/commit/0b5f2e8b804f804129ae6928165fc30386ec96bf, https://github.com/darlinghq/darling-cocotron/commit/50a587936a7047998193044b15e3c8ab19017168 and https://github.com/darlinghq/darling-cocotron/commit/3f78e7d09c6e19b5f6ffca2d80cc39fdd9d9d115 the program from the post now works for me.