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 seem to import Foundations/Foundations.h #444

Open
Nibroc00 opened this issue Jan 15, 2025 · 0 comments
Open

Cannot seem to import Foundations/Foundations.h #444

Nibroc00 opened this issue Jan 15, 2025 · 0 comments

Comments

@Nibroc00
Copy link

Nibroc00 commented Jan 15, 2025

I am currently trying to build with Wails from Linux which has lead me through quite a rabbit hole to here. I was able to get osxcross built but I cannot compile with o64-clang when I need to import the Foundations framework.

I got my sdk (14.4) from here

Here is a test.m that I am using to replicate the issue:

#import <Foundation/Foundation.h>
#import <WebKit/WebKit.h>

int main() {
    NSLog(@"Foundation and WebKit imported successfully.");
    return 0;
}

Here's the general command have been using to and tweaking with any argument that remotely seems like it might help.
o64-clang -o test test.m -framework Foundation -framework WebKit

And here is my error that is missing things all from the Foundation framework:

In file included from test.m:4:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h:26:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/NSAttributedString.h:32:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h:12:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSFontManager.h:13:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenu.h:12:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenuItem.h:13:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:19:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:10:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:10:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:39:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:21:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:20:
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTLine.h:138:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'?
    CFAttributedStringRef attrString ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
    ^
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here
typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM;
                   ^
In file included from test.m:4:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h:26:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/NSAttributedString.h:32:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h:12:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSFontManager.h:13:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenu.h:12:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenuItem.h:13:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:19:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:10:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:10:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:39:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:21:
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:102:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'?
    CFAttributedStringRef string ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
    ^
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here
typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM;
                   ^
In file included from test.m:4:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h:26:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/NSAttributedString.h:32:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h:12:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSFontManager.h:13:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenu.h:12:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenuItem.h:13:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:19:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:10:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:10:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:39:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:21:
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:129:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'?
    CFAttributedStringRef string,
    ^
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here
typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM;
                   ^
In file included from test.m:4:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h:26:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/NSAttributedString.h:32:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h:12:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSFontManager.h:13:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenu.h:12:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenuItem.h:13:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:19:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:10:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:10:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:39:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26:
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:82:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'?
    CFAttributedStringRef attrString ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
    ^
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here
typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM;
                   ^
In file included from test.m:4:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h:34:
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKDownloadDelegate.h:83:183: error: unexpected type name 'NSURLCredential': expected identifier
- (void)download:(WKDownload *)download didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler WK_SWIFT_ASYNC_NAME(download(_:respondTo:));


^
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKDownloadDelegate.h:83:199: error: expected ')'
- (void)download:(WKDownload *)download didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler WK_SWIFT_ASYNC_NAME(download(_:respondTo:));


                ^
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKDownloadDelegate.h:83:144: note: to match this '('
- (void)download:(WKDownload *)download didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler WK_SWIFT_ASYNC_NAME(download(_:respondTo:));

                                                    ^
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKDownloadDelegate.h:83:145: error: a parameter list without types is only allowed in a function definition
- (void)download:(WKDownload *)download didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler WK_SWIFT_ASYNC_NAME(download(_:respondTo:));

                                                     ^
In file included from test.m:4:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h:39:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKFrameInfo.h:30:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h:31:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:28:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCollectionView.h:9:
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSViewController.h:260:39: error: unknown type name 'NSExtensionContext'; did you mean 'NSAnimationContext'?
@property (nullable, readonly,retain) NSExtensionContext *extensionContext API_AVAILABLE(macos(10.10));
                                      ^
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:19:12: note: 'NSAnimationContext' declared here
@interface NSAnimationContext : NSObject
           ^
In file included from test.m:4:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h:43:
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationDelegate.h:158:142: error: unknown type name 'NSURLSessionAuthChallengeDisposition'
- (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler WK_SWIFT_ASYNC_NAME(webView(_:respondTo:));

                                                  ^
In file included from test.m:4:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h:70:
In file included from /home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKitLegacy.h:40:
/home/nibroc/osxcross-14.4/target/SDK/MacOSX14.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebHistory.h:132:44: error: expected a type
- (NSArray *)orderedItemsLastVisitedOnDay:(NSCalendarDate *)calendarDate;
                                           ^
10 errors generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant