﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6004	Cpp runtime on Windows can't handle spaces in install path	Andreas Heuermann	Adrian Pop	"The C++ runtime can't handle the default installation location `C:\Program Files\OpenModelica1.16.0-dev-64bit\` on Windows because of the space.

For omsicpp sim code target:
test.mos:
{{{
loadString(""model M
end M;""); getErrorString();
setCommandLineOptions(""-d=newInst --simCodeTarget=omsicpp""); getErrorString();
simulate(M); getErrorString();
}}}


Run mos script:
{{{
true
""""
true
""""
record SimulationResult
    resultFile = """",
    simulationOptions = ""startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-006, method = 'dassl', fileNamePrefix = 'M', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''"",
    messages = ""Failed to build model: M"",
    timeSimulation = 0.0,
    timeTotal = 0.3822554
end SimulationResult;
""Error: Error building simulator. Build log: mingw32-make: Entering directory 'D:/WORKSP~1/TESTIT~1/M82C0~1.FMU'
\""mkdir.exe\"" -p M.fmutmp/sources M.fmutmp/sources/include M.fmutmp/sources/libs
\""mkdir.exe\"" -p M.fmutmp/resources
\""mkdir.exe\"" -p M.fmutmp/binaries/win64
# Basic OMSI and OMSIC files
cp -a C:/Program Files/OpenModelica1.16.0-dev-64bit/include/omc/omsi/* M.fmutmp/sources/include/
cp: cannot stat 'C:/Program': No such file or directory
cp: cannot stat 'Files/OpenModelica1.16.0-dev-64bit/include/omc/omsi/*': No such file or directory
M_FMU.makefile:69: recipe for target 'copyFiles' failed
mingw32-make: *** [copyFiles] Error 1
mingw32-make: Leaving directory 'D:/WORKSP~1/TESTIT~1/M82C0~1.FMU'
RESULT: 2
""
}}}

And for `--simCodeTarget=cpp` I get:
{{{
$ ""C:\Program Files\OpenModelica1.16.0-dev-64bit\bin\omc"" BouncingBallFMI20_cpp.mos --locale=en
true
""""
true
""""
record SimulationResult
    resultFile = """",
    simulationOptions = ""startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-006, method = 'dassl', fileNamePrefix = 'M', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''"",
    messages = ""Simulation execution failed for model: M
WARNING: other : Warning: unrecognized command line options Files/OpenModelica1.16.0-dev-64bit/lib//omc/omsicpp/
Simulation stopped with error in model factory: Failed loading SimController library from path C:\\Program\\libOMCppSimController.dll"",
    timeFrontend = 0.0003001,
    timeBackend = 0.0066663,
    timeSimCode = 0.0004555,
    timeTemplates = 0.0507363,
    timeCompile = 7.3837476
end SimulationResult;
""""
}}}



"	defect	assigned	blocker	Future	Cpp Run-time	v1.16.0-dev		Windows Spaces	Adrian Pop Niklas Worschech
