# A bug fix to mathematica 10.0.1.0

There is a bug in the Wolfram Symbolic Transfer Protocol Development in C (Windows).

I described it in the next answer by myself, from which I summarize:

One cannot successfully compile the addtwo.c demo in C:\Program Files\Wolfram Research\Mathematica\10.0\SystemFiles\Links\WSTP\DeveloperKit\Windows\WSTPExamples\addtwo, even if one follows the instructions in "WSTP Development in C (Windows)" strictly.

Question: Does anybody have a patch?

Well, I have one and I can post it here as an answer if somebody gives me a hint on how to do it.

BTW, is anybody interested in Mathematica related programming with DELPHI, I have done a bit of code porting, any suggestions on pascal style porting are welcomed.

• I suppose you could post it to a place like GitHub and provide a link. Your description is pretty vague and hardly seems like a question for other users to answer. (This is a Q&A site.) – Michael E2 Dec 11 '14 at 0:10
• @MichaelE2 But he can answer himself! – Dr. belisarius Dec 11 '14 at 0:11
• @belisarius The only (explicit) question is how to post an attachment. – Michael E2 Dec 11 '14 at 0:14
• @MichaelE2 Yeah, yeah, there :). I'll edit the question – Dr. belisarius Dec 11 '14 at 0:38
• I added what I thought was the crux of the question. I think it is good to have a description of the problem in the question, so that users can see easily what it about. Also I tagged it "Windows" for now. If someone else knows the problem exists on other platforms and that Donald's patch fixes it, this could be changed. – Michael E2 Dec 11 '14 at 18:01

Wolfram has replaced MathLink with WSTP, but both their document and tool related to this are outofdated. Because of this bug, nobody could successfully compile the "addtwo.c" demo in "C:\Program Files\Wolfram Research\Mathematica\10.0\SystemFiles\Links\WSTP\DeveloperKit\Windows\WSTPExamples\addtwo", even if he followed the instruction in "WSTP Development in C (Windows)" strictly. The fixed document can be download from Baidu netdisk:link password: xiwn

Thanks for MichaelE2's suggestion. I should post this in Wolfram community link, but I never login the site successfully, so ...

I did compile the addtwo example using CreateExecutable as follows:

examplesDir =
FileNameJoin[{$InstallationDirectory, "SystemFiles", "Links", "WSTP", "DeveloperKit",$SystemID, "WSTPExamples", "addtwo"}];
files = FileNames["*", examplesDir]

FileNameJoin[{$InstallationDirectory, "SystemFiles", "Links", "WSTP", "DeveloperKit",$SystemID, "CompilerAdditions", "mldev64"}]
CCompilerDriverCCompilerDriverBasePrivate\$MprepExePath =
`