Thank you for the advice. Now I'm solving other problems but I hope to get back to the topic in time.
Hi,
Not sure whether it answers your question, but if you need tensor-like arguments, then here is how Mathematica does it:
F = Compile[{{n, _Integer,1}},n^2, CompilationTarget -> "C" ]; ExportString[F,"C"]
I.M.