Posts

Showing posts from August, 2018

CLANG, -fblock undefined reference to `_NSConcreteGlobalBlock'

Recently i pickup objective-c to play with. And stumbled upon with this little beast called Block which similar to lambda function. I am running *debian 8 x64* During compilation: $ clang `gnustep-config --objc-flags` -fblocks -o method-2 method-2.m -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include -I/opt/obj-c/libobjc2/ -I/usr/lib/ -lgnustep-base  -lobjc it outputs: In file included from method-2.m:1: In file included from /usr/include/GNUstep/Foundation/Foundation.h:30: In file included from /usr/include/GNUstep/GNUstepBase/GSVersionMacros.h:219: /usr/include/GNUstep/GNUstepBase/GSConfig.h:416:13: warning: ignoring       redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition] #    define __strong             ^ /usr/include/GNUstep/GNUstepBase/GSConfig.h:417:13: warning: ignoring       redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition] #    define __weak             ^ 2 warnings generated. /tmp/method-2-ed2a94.o:(.data.rel.ro+0x30): un