lbl-srg / EnergyPlusToFMU

EnergyPlus export as a Functional Mockup Unit for co-simulation
41 stars 17 forks source link

utilManageCompileLink compile error "==" was unexpected at this time #18

Closed dostaji4 closed 6 years ago

dostaji4 commented 6 years ago

Dear developers, I've been trying to use your utility but ran into problems I'm not able to solve. Running on Win 10 64bit, Python 2.7, VS 14.0, I've succesfully got 64 as an answer out of the test-c-exe.bat (either using Dev. Commnad Prompt or changing the paths in batch scripts to VC 14.0). From there I've continued the Guide, but got stuck at invoking the EnergyPlusToFMU.py, specifically in the compilation phase. When I tried to compile all the c and cpp files alone, it compiled them. There might be an issue in the utilManageCompileLink script? IDK. Anyway, thank you for any suggestions.

Thank you, Jiri

Here is the diagnostic output:

C:\Python27\python.exe EnergyPlusToFMU.py -i C:\EnergyPlusV8-5-0\Energy+.idd -d ..\Examples\Variable_fmu-export-variable.idf ! EnergyPlusToFMU.py -- Setting IDF file to {..\Examples\Variable_fmu-export-variable.idf} ! EnergyPlusToFMU.py -- Begin exporting IDF file {..\Examples\Variable_fmu-export-variable.idf} as an FMU ! EnergyPlusToFMU.py -- Note no WTH file given ! EnergyPlusToFMU.py -- Using model identifier {_fmu_export_variable} ! EnergyPlusToFMU.py -- Checking for export-prep application ! makeExportPrepApp.pyc -- Begin creating executable {idf-to-fmu-export-prep-win.exe} ! makeExportPrepApp.pyc -- Using system-specific scripts from batch directory {win} ! utilManageCompileLink.pyc -- Begin compile-link build of {idf-to-fmu-export-prep-win.exe} ! utilManageCompileLink.pyc -- Cleaning up existing build directory {bld-idf-to-fmu-export-prep-win-exe} ! utilManageCompileLink.pyc -- Jumping to build directory {bld-idf-to-fmu-export-prep-win-exe} ! utilManageCompileLink.pyc -- Compiling files using {C:\work\projects\Hydronics_4_0\Matlab\Building co-simulation\EnergyPlusToFMU-v2.0.3\Scripts\win\compile-cpp.bat} ! utilManageCompileLink.pyc -- Compiling {app-cmdln-input.cpp} co-simulation\EnergyPlusToFMU-v2.0.3\SourceCode\fmu-export-prep\app-cmdln-input.cpp""=="" was unexpected at this time. ERROR from script file {utilManageCompileLink.pyc} Failed to create object file for source code file {C:\work\projects\Hydronics_4_0\Matlab\Building co-simulation\EnergyPlusToFMU-v2.0.3\SourceCode\fmu-export-prep\app-cmdln-input.cpp}

dostaji4 commented 6 years ago

UPDATE: The same issue pertains across all releases, Python 2.6, Python 2.7, EP8.x, 32bit or 64bit, Visual Studio 10.

dostaji4 commented 6 years ago

SOLUTION: The error was in the batch files. Replace all IF "%1"=="" with IF -%1-==-- and it should work. JD.

dostaji4 commented 6 years ago

Solution found and integrated.