Fix linking with -whole-module-optimization enabled
This commit is contained in:
@@ -37,15 +37,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
@_cdecl("runNSApplication")
|
||||
func runNSApplication() {
|
||||
let app = NSApplication.shared()
|
||||
var topObjects: NSArray = []
|
||||
NSNib.init(nibNamed: "MainMenu", bundle: Bundle(for: AppDelegate.self))!
|
||||
.instantiate(withOwner: app, topLevelObjects: &topObjects)
|
||||
app.run()
|
||||
}
|
||||
|
||||
|
||||
// Swift to Haskell ByteString Example
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#import "SwiftAppLibrary.h"
|
||||
|
||||
@interface AClassInThisFramework : NSObject @end
|
||||
@implementation AClassInThisFramework @end
|
||||
|
||||
void runNSApplication(void) {
|
||||
NSApplication *app = [NSApplication sharedApplication];
|
||||
NSBundle *bundle = [NSBundle bundleForClass:[AClassInThisFramework class]];
|
||||
NSArray *topObjects;
|
||||
[[[NSNib alloc] initWithNibNamed:@"MainMenu" bundle:bundle]
|
||||
instantiateWithOwner:app topLevelObjects:&topObjects];
|
||||
[app run];
|
||||
}
|
||||
Reference in New Issue
Block a user