Order of the Butterfly
Posts: 429 from 2014/6/11
From: Germany
Hi.
I'm current playing with the ObjC implementation and trying to get a simple Hello World working.
After creating a new project in FlowStudio and simple main.c that prints a HGelloWorld using printf works fine.
But when adding a new ObjC class and linking I get a linker error like this:
Code:
make: Entering directory '/Work/DevelAdd/Sources/objc/FooTest319'
compiling main_RELEASE.o
q qcompiling AppMain_RELEASE.mo
q qlinking FooTest
/gg/ppc-morphos/bin/ld: /gg/ppc-morphos/lib/libobjfwrt.library.a(linklib.o): in function `ctor':
/home/jaca/morphos/morphoswb/classes/frameworks/objfw/ObjFW/src/runtime/linklib/linklib.m:102: undefined reference to `_Unwind_RaiseException'
/gg/ppc-morphos/bin/ld: /home/jaca/morphos/morphoswb/classes/frameworks/objfw/ObjFW/src/runtime/linklib/linklib.m:68: undefined reference to `_Unwind_DeleteException'
/gg/ppc-morphos/bin/ld: /home/jaca/morphos/morphoswb/classes/frameworks/objfw/ObjFW/src/runtime/linklib/linklib.m:70: undefined reference to `_Unwind_GetLanguageSpecificData'
/gg/ppc-morphos/bin/ld: /home/jaca/morphos/morphoswb/classes/frameworks/objfw/ObjFW/src/runtime/linklib/linklib.m:102: undefined reference to `_Unwind_GetRegionStart'
/gg/ppc-morphos/bin/ld: /home/jaca/morphos/morphoswb/classes/frameworks/objfw/ObjFW/src/runtime/linklib/linklib.m:102: undefined reference to `_Unwind_GetDataRelBase'
/gg/ppc-morphos/bin/ld: /home/jaca/morphos/morphoswb/classes/frameworks/objfw/ObjFW/src/runtime/linklib/linklib.m:102: undefined reference to `_Unwind_GetTextRelBase'
/gg/ppc-morphos/bin/ld: /home/jaca/morphos/morphoswb/classes/frameworks/objfw/ObjFW/src/runtime/linklib/linklib.m:105: undefined reference to `_Unwind_GetIP'
/gg/ppc-morphos/bin/ld: /home/jaca/morphos/morphoswb/classes/frameworks/objfw/ObjFW/src/runtime/linklib/linklib.m:105: undefined reference to `_Unwind_GetGR'
/gg/ppc-morphos/bin/ld: /home/jaca/morphos/morphoswb/classes/frameworks/objfw/ObjFW/src/runtime/linklib/linklib.m:105: undefined reference to `_Unwind_SetIP'
/gg/ppc-morphos/bin/ld: /home/jaca/morphos/morphoswb/classes/frameworks/objfw/ObjFW/src/runtime/linklib/linklib.m:105: undefined reference to `_Unwind_SetGR'
/gg/ppc-morphos/bin/ld: /home/jaca/morphos/morphoswb/classes/frameworks/objfw/ObjFW/src/runtime/linklib/linklib.m:105: undefined reference to `_Unwind_Resume'
/gg/ppc-morphos/bin/ld: /home/jaca/morphos/morphoswb/classes/frameworks/objfw/ObjFW/src/runtime/linklib/linklib.m:105: undefined reference to `__register_frame_info'
/gg/ppc-morphos/bin/ld: /home/jaca/morphos/morphoswb/classes/frameworks/objfw/ObjFW/src/runtime/linklib/linklib.m:105: undefined reference to `__deregister_frame_info'
collect2: ld returned 1 exit status
make: *** [Work:DevelAdd/Sources/objc/FooTest319/Makefile:79: FooTest] Error 1
make: Leaving directory '/Work/DevelAdd/Sources/objc/FooTest319'
The ObjC code is quite simple:
Code:
#import <ob/OBFramework.h>
#include "stdio.h"
@interface MainApp : OBObject
@end
@implementation MainApp
- (void) main {
printf("Hello from MainApp.");
}
@end
Any idea what the problem is?