Re v10.2 under Windows 8.1.
What causes the two error messages below? One says to convert code to DOS format -- but doesn't Mathematica pump out C99-standard code? Is this fix as simple as specifying some option to CreateExecutable? Notice that the ExportString output is atch'd (there's a renegade leading quote).
Maybe there's a known problem with the installed C compiler. Maybe the first message causes the other. No doubt user-error is the culprit but I don't know.
Thanks.
Bruce
The code is:
Needs@"CCompilerDriver`";
CCompilers[]
g=Compile[{x},x^2];
cCode=ExportString[g,"C"]; (* code is atch'd as CCode.txt *)
CreateExecutable[cCode,"mine"]
CCompilers[] above returns:
{{"Name" -> "Visual Studio",
"Compiler" ->
CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler,
"CompilerInstallation" ->
"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0",
"CompilerName" -> Automatic}}
The error messages are
CreateExecutable::cmperr: Compile error: C:\Users\Bruce\AppData\Roaming\Mathematica\SystemFiles\LibraryResources\Wind\[Ellipsis] format detected: please convert the source file to either DOS or UNIX format >>
CreateExecutable::cmperr: Compile error: C:\Users\Bruce\AppData\Roaming\Mathematica\SystemFiles\LibraryResources\Wind\[Ellipsis] file: 'm-dde41816-6467-4e82-b364-babb0f35cfd0.h': No such file or directory >>
Attachments: