का उपयोग करके क्लैंग प्रोग्राम के लिए आपको कौन से पुस्तकालयों को लिंक करने की आवश्यकता है, मैंने पाया है (नीचे) कि मुझे ब्लॉक का उपयोग करने वाले कोड को संकलित करते समय -फ्लॉक्स का उपयोग करने की आवश्यकता है।ब्लॉक
लिंकर को _NSConcreteStackBlock को हल करने के लिए मुझे किस लाइब्रेरी को लिंक करने की आवश्यकता है? (उबंटू पर 9.10 AMD64।)
[email protected]:~$ clang ctest.c
ctest.c:3:25: error: blocks support disabled - compile with -fblocks or pick a
deployment target that supports them
void call_a_block(void (^blockptr)(int)) {
^
ctest.c:11:19: error: blocks support disabled - compile with -fblocks or pick a
deployment target that supports them
call_a_block(^(int y) {
^
2 diagnostics generated.
[email protected]ris-desktop:~$ clang ctest.c -fblocks
/tmp/cc-4sPSeO.o: In function `main':
ctest.c:(.text+0x79): undefined reference to `_NSConcreteStackBlock'
collect2: ld returned 1 exit status
clang: error: linker command failed with exit code 1 (use -v to see invocation)