An appropriate error message appears when I'm trying to link Lua 5.1.2 with msvcrt.dll.a. Here is the cause https://sourceforge.net/tracker/index.php?func=detail&aid=1956337&group_id=2435&atid=302435
Sorry for responding so late to this. I'm reviewing all tickets and this one is a bit old. Is this still an issue for you? If so, can you please attach a simple test case that shows the issue?
If I remember correctly I've solved the problem by upgrading my MinGW files by more recent ones or something like that. The issue is to be closed for sure.
Thanks for confirming.