I have a bunch of old C code, which I compiled using MinGW, and copied the generated library files to a VS C++ DLL (C++/CLI) Project (named NBIS) directory and added them to the Linker->Input Files setting. The content of this field for each configuration is listed below.
Release Configuration
liban2k.a;libbozorth3.a;libcblas.a;libclapck.a;libf2c.a;libfet.a;libfft.a;libihead.a;libimage.a;libioutil.a;libjpegb.a;libjpegl.a;libmindtct.a;libmlp.a;libnfiq.a;libnfseg.a;libpca.a;libpcautil.a;libutil.a;libwsq.a;libgcc.a;libmingwex.a;libmoldname.a;libmsvcr100.a
Debug Configuration
liban2k.a;libbozorth3.a;libcblas.a;libclapck.a;libf2c.a;libfet.a;libfft.a;libihead.a;libimage.a;libioutil.a;libjpegb.a;libjpegl.a;libmindtct.a;libmlp.a;libnfiq.a;libnfseg.a;libpca.a;libpcautil.a;libutil.a;libwsq.a;libgcc.a;libmingwex.a;libmoldname.a;libmsvcr100d.a
When I compile and run using the debug configuration, it succeeds. When I compile and run using release configuration, I get this error: "Unhandled Exception: System.IO.FileLoadException: A procedure imported by 'NBIS.dll' could not be loaded."
If I change the release configuration's C/C++->Code Generation->Runtime Library to "Multi-threaded Debug DLL (/MDd)", the release configuration is able to successfully compile and run. Has anyone run into a similar issue and has a solution or any guidance on how to troubleshoot this?