gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compiled GUI program fails to run


From: Patryk Laurent
Subject: Compiled GUI program fails to run
Date: Sun, 31 May 2015 06:50:44 +0000 (GMT)

Hello,

With the latest from source on Ubuntu 14.04, I get some warnings and a core dump when running a simple GUI program.

address@hidden:~$ clang `gnustep-config --objc-flags` `gnustep-config --objc-libs`  -fobjc-runtime=gnustep -fblocks -lobjc -fobjc-arc -ldispatch -lgnustep-base -lgnustep-gui  guitest.m
clang-3.7: warning: argument unused during compilation: '-fobjc-nonfragile-abi'
clang-3.7: warning: argument unused during compilation: '-fobjc-nonfragile-abi'

address@hidden:~$ ./a.out
2015-05-30 23:47:12.506 a.out[23710:23710] Library directory '/home/patryk/GNUstep/Library' not available!
2015-05-30 23:47:12.507 a.out[23710:23710] File NSData.m: 162. In BOOL readContentsOfFile(NSString *, void **, off_t *, NSZone *) Open ((null)) attempt failed - bad path
2015-05-30 23:47:12.507 a.out[23710:23710] No font cache available - building new one - this may take several seconds (or minutes on a slow machine with lots of fonts)
2015-05-30 23:47:12.508 a.out[23710:23710] Running /usr/GNUstep/Local/Tools/font_cacher
./a.out: Uncaught exception NSInvalidArgumentException, reason: Tried to init array with nil object
Aborted (core dumped)

This program worked previously, so I was wondering if anyone knew what the issue might be.

Thank you,
Patryk



#import <AppKit/AppKit.h>

int main()
{
  NSApplication *app;
  app = [NSApplication sharedApplication];

  NSAlert * alert = [[NSAlert alloc] init];
  [alert setMessageText:@"Hello alert"];
  [alert addButtonWithTitle:@"All done"];
  int result = [alert runModal];
  if (result == NSAlertFirstButtonReturn) {
    NSLog(@"First button pressed");
  }
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]