Compile (and call) a C function from Julia


I wonder if it would make sense that Julia enables one to call a C function described by its source code…
#include <stdio.h>
int main()
// printf() displays the string inside quotation
printf(“Hello, World!”);
return 0;


Cxx.jl has that function.


Thank you !!


Note that if you have a C compiler installed, you can invoke it an load the resulting code pretty easily from Julia. See e.g. the first example in:


Thank you very much for the link ! The conciseness of the C function build looks like blackmagic :open_mouth: I should add this one to Sum performance for Array{Float64,2} elements benchmark curves (I think I remember that gcc did not perform very well on that specific loop).