|
Using LLVM Clang and Blocks under Linux
Can be downloaded from this link: http: //llvm.org/releases/download.html
sudo apt-get install llvm
sudo apt-get install clang
sudo apt-get install libblocksruntime-dev
Code:
#include < stdio.h>
#include < Block.h>
int main () {
void (^ hello) (void) = ^ (void) {
printf ( "! Hello, block \ n");
};
hello ();
return 0;
}
Compile and connections:
clang test.c -fblocks -lBlocksRuntime -o test |
|
|
|