I've been recompiling old mathlink programs in Visual Studio 2013. No major problems so far until I got to a program that is seemingly similar to the others but that fails dramatically in the linking stage, generating a series of errors suggesting that WSTP32 was compiled with unusual settings.

enter image description here

Any suggestions for what might be causing this, and how I might get it to link?

  • $\begingroup$ [ March 2016 ] I have gotten this code to work in a new project. I'm not sure what precisely I was doing wrong in 2015 but it's likely that I had specified that Visual Studio build a Console application rather than a Windows application, among other problems. $\endgroup$ Commented Mar 4, 2016 at 21:52

1 Answer 1


You are linking against the static library instead of the import library. Remove the 's' from the wstp32i4s.lib that was supplied to link.exe.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.