If you want to use ARC, then you must use the new ABI. Either specify -fobjc-runtime=gnustep-1.7, or -fobjc-nonfragile-abi.
David On 27 Dec 2013, at 20:04, Patryk Laurent <[email protected]> wrote: > > David, > > Another oddity that maybe will help diagnose the issue: If I compile a GUI > test program without -fobjc-arc, everything works fine. However, if I > include -fobjc-arc, compilation is successful but running is not, see below: > > patryk@paklbox:~$ clang `gnustep-config --objc-flags` `gnustep-config > --objc-libs` -fobjc-runtime=gnustep-1.7 -fblocks -fobjc-arc -lobjc > -ldispatch -lgnustep-base -lgnustep-gui guitest.m > patryk@paklbox:~$ ./a.out > Objective-C ABI Error: Loading modules from incompatible ABIs while loading > ./GSBackend.m > a.out: /home/patryk/libobjc2/loader.c:53: void __objc_exec_class(struct > objc_module_abi_8 *): Assertion `objc_check_abi_version(module)' failed. > Aborted (core dumped) > > (This is under Ubuntu 13.10 Desktop, following the instructions here: > http://wiki.gnustep.org/index.php/GNUstep_under_Ubuntu_Linux) > > Patryk > > > Here is the source to guitest.m: > > patryk@paklbox:~$ cat guitest.m > #import <AppKit/AppKit.h> > > int main() > { > NSApplication *app; // Without these 2 lines, seg fault may occur > app = [NSApplication sharedApplication]; > > NSAlert * alert = [[NSAlert alloc] init]; > [alert setMessageText:@"Hello alert"]; > [alert addButtonWithTitle:@"All done"]; > [alert runModal]; > } > > Compiling it without -fobjc-arc works fine: > > patryk@paklbox:~$ clang `gnustep-config --objc-flags` `gnustep-config > --objc-libs` -fobjc-runtime=gnustep-1.7 -fblocks -lobjc -ldispatch > -lgnustep-base -lgnustep-gui guitest.m # NSAlert test works fine without > -fobjc-arc. > -- Sent from my Difference Engine _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
