When you receive an Unresolved _mFgmain - link failure such as this:
It usually means that a non-main PL/I program (e.g., a program that does not include OPTIONS(MAIN)) is attempting to link into a dynamic link library (DLL).
Solution: Instead of linking to a DLL, link non-main PL/I programs into other programs statically, and call them directly.