I recently set about to re-compile some old (2008-2009) applications that use MathLink in preparation for creating new, modified versions. Mathlink has been deprecated but WSTP seems like a fairly painless replacement and I had no trouble getting the code to compile and the project to build under Visual Studio 2013.

Unfortunately, the resulting code doesn't run correctly. Whereas the old code, if double-clicked, did this:

the new one does this

The "missing" DLL is definitely on the drive, and the project would not have compiled without it. Putting an extra copy into the application directory doesn't help.

DependencyWalker reports as follows:

Which seems to restate the problem in other words but doesn't bring me to a solution.

The DLL has been included in the project, but Visual Studio marks it "Does Not Participate in Build," which seems as though it might be a problem but it's not at all obvious what to change it to.

Any suggestions?

• My first intention would be to use the dependency walker on the created executable and see what it shows you about the library that is missing. – halirutan Feb 18 '15 at 19:58
• Perhaps you'll find some useful info here: mathematica.stackexchange.com/a/74132/12 I haven't encountered this particular problem you mention. – Szabolcs Feb 18 '15 at 20:00
• Also note, "The WSTP dlls are no longer installed in the Windows System32 (SysWOW64) directory. Instead these libraries are contained in the Wolfram System layout." – Szabolcs Feb 18 '15 at 20:01
• Finally: you can copy these DLLs next to your application, just make sure you know which one (which version) is needed. I believe they can even be distributed for as long as you abide by the license. – Szabolcs Feb 18 '15 at 20:03
• What DependencyWalker shows is unusual. First, did you use the MathLink development kit or the WSTP one? If it's an old program that uses the ML naming convention then you should use the MathLink one and use DLLs named as ml64i3.dll or ml64i4.dll (for interface version 4). Since it's an old program and you might want to ensure compatibility with v9 too, I suggest using interface version 3. – Szabolcs Feb 18 '15 at 20:15