If you are linking to the shared run--time system it is relying on the current setting of the PATH or COBDIR environment variables in order to locate and load the COBOL run-time system cblrtsm.dll. If you have an old version of cblrtsm.dll from a different Micro Focus product within the PATH or it locates a 64-bit version when you are running a 32-bit application then this could account for the error that you are seeing.
You would not see the same error when running under the IDE as it locates the run-time system using the proper registry entries for the product you are using.
Likewise, when you turn dynamic linking on your application also will look in the system registry under the appropriate product entry to locate and load the COBOL run-time system instead of relying on the setting of PATH.
It sounds as if your system PATH does not include the bin folder for the Visual COBOL product which by default on a 64-bit system would be located at c:\program files (x86)\micro focus\visual cobol\bin.
Thanks.