<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/89321>89321</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Blocks Runtime Error
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
RuiCuco
</td>
</tr>
</table>
<pre>
Consider 'testblocks.c':
```
#include <stdio.h>
int main(void)
{
^void(void){printf("Hello!\n");}();
return 0;
}
```
If I say (in MSYS2 in Windows 11):
clang -std=c17 -fblocks -o testblocks.exe testblocks.c -lBlocksRuntime
I get the following error:
C:\Developer\msys64\ucrt64\bin\ld: C:\Developer\msys64\tmp\testblocks-767281.o:testblocks.c:(.text+0x53): undefined reference to '__imp__NSConcreteGlobalBlock'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is this a bug or am I doing something wrong?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8U89vrDYQ_muGy2hXYMMCBw5ZNtvm0B5eDlVPkbEHcJ-xV7bZTf77CkiySVU9CQ0zzK_Pnz9ECHqwRA0URyhOiZjj6HzzY9btLF3SOfXWtM4GrcgjsDJSiJ1x8mfYS2Al8AdIT5B-2EP6_mwh49pKMytC4G2ISrv9CPzxa4u2ESehLbDq6rQCVr9ny-NHWQ3F45b7LCmPF69t7IFVwNjvZIwDlkHRWmBsKeBHKE9rdvU_JnmKs7eY3r-Vp_-HvtqnHp8wiDcEVmmLfzz__cxQW_xLW-VuAbNsnf-NA2mEHXAXogJ-klmJu34jDHcOv9BHr_Q1lLgzx9X9MduoJ_qGAweKGEfC3hnjbtoOSN47_5_d7RIX7YmuZNyFPBTtFN7CIYeinaWPq9NpC0VrFPAH_FVDnC6L_YS4Kw8lq7K9A_7wTQb8AVi1j_QagR3T14JvpOBsFfXakkJPPXmykjC6RUUvL3q6vLz8-dw6Kz1F-s24TmznX1R1J3KZ83FSNNr-JI_STZOwCnuhDSm86TgiveqI0inCbLmsORDursu2QITaXp0UUTt7l9fGa8A46oACu3lA51FM-ITKLfwGN1EcF-_m3QLkvPUkquGq5rVIqMnKjOdlWRQ8GZucqiw_HFSnyl5ycSiIZ7moVcdEX6lDmuiGpSxP86xiWVFnfC9y4jUJ3meMH6qSQ57SJLTZG3Od9s4PiQ5hpqaqOcsSIzoyYf1RGbN0wzW56L04Jb5ZenbdPATIU6NDDPcpUUdDzaYufJcXPi6sJrM3zRjjJay3eAZ2HnQc524v3QTsvIx4f-0u3v1DMgI7r4sDsPMK7N8AAAD__wyRSh0">