Just tried it again and now it works without loading explicitely the exe. I don't know why it didn't work last time. Are compilation options such as -s, -O3, etc. affecting the function resolution ?
But it doesn't work if the imported function is __stdcall, even if __stdcall is specified both in C and in lua.
I think it's about "func@XX" naming, is there a way to work around ?