Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile successfully on 4.2-dev6 on MacOS #82835

Closed
cyberpsyche opened this issue Oct 5, 2023 · 3 comments · Fixed by #82876
Closed

Cannot compile successfully on 4.2-dev6 on MacOS #82835

cyberpsyche opened this issue Oct 5, 2023 · 3 comments · Fixed by #82876

Comments

@cyberpsyche
Copy link

cyberpsyche commented Oct 5, 2023

Godot version

Godot 4.2 dev6

System information

MacOS 10.15.7 (19H2) Intel Iris Graphics 6100 1536 MB

Issue description

When compile dev6 code, I got this error message:

platform/macos/display_server_macos.mm:193:93: error: multiple methods named 'layer' found with mismatched result, parameter type or attributes
                        Error err = gl_manager_angle->window_create(window_id_counter, nullptr, (__bridge void *)[wd.window_view layer], p_rect.size.width...
                                                                                                                 ^~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:255:39: note: 
      one possibility
@property (nullable, strong) CALayer *layer API_AVAILABLE(macos(10.5));
                                      ^~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h:37:35: note: 
      also found
@property(readonly) CAMetalLayer *layer;
                                  ^~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVMovieTrack.h:180:33: note: 
      also found
@property (nonatomic) NSInteger layer;
                                ^~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CARemoteLayerClient.h:39:38: note: 
      also found
@property(nullable, strong) CALayer *layer;
                                     ^~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CARenderer.h:68:38: note: 
      also found
@property(nullable, strong) CALayer *layer;
                                     ^~~~~

Hot to resolve it ?

Steps to reproduce

no content here

Minimal reproduction project

no content here

@bruvzg
Copy link
Member

bruvzg commented Oct 5, 2023

Can't reproduce with Xcode 15, likely an issue with old Xcode/SDK.

Probably can be fixed by replacing this line with:

CALayer *layer = [(NSView *)wd.window_view layer];
Error err = gl_manager_angle->window_create(window_id_counter, nullptr, (__bridge void *)layer, p_rect.size.width, p_rect.size.height);

@cyberpsyche
Copy link
Author

@bruvzg Your code works. Thank you~

@fire
Copy link
Member

fire commented Oct 5, 2023

Can you close if this fixes your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants