Build EnergyPlus from source code in VS 2015 doesn't work
Hi,
I need to compile Energyplus source code. I followed the instructions for Windowns on Energyplus GitHub Wiki. While generating it,it displayed some files (dlfcn.h strings.h unistd.h getpagesize bcopy mmap off_t size_t fseeko unistd.h pthread.h) not found while configuration and generation done. After I launch Visual studio 2015, open EnergyPlus.sln and do a Release build "EnergyPlus", it says error and doesn't work. Could anyone please help me to solve it?
Thanks in advance.
Charlie
Visual Studio 2015 shows 88 Errors, including:
Severity Code Description Project File Line Suppression State
Error C2001 newline in constant energypluslib C:\energyplusbuild\build\src\EnergyPlus\DataStringGlobals.cc 83
Error C2001 newline in constant energypluslib C:\energyplusbuild\build\src\EnergyPlus\DataStringGlobals.cc 84
Error C2001 newline in constant energypluslib C:\energyplusbuild\build\src\EnergyPlus\DataStringGlobals.cc 85
Error C2143 syntax error: missing ')' before ';' energypluslib C:\energyplusbuild\build\src\EnergyPlus\DataStringGlobals.cc 86
Error C2001 newline in constant energypluslib C:\energyplusbuild\sourcecode\src\EnergyPlus\OutputReportTabular.cc 5481
Error C2062 type 'const int' unexpected energypluslib C:\energyplusbuild\sourcecode\src\EnergyPlus\OutputReportTabular.cc 5484
Error C2065 'StatisticsLine': undeclared identifier energypluslib C:\energyplusbuild\sourcecode\src\EnergyPlus\OutputReportTabular.cc 5584
Error C2065 'StatisticsLine': undeclared identifier energypluslib C:\energyplusbuild\sourcecode\src\EnergyPlus\OutputReportTabular.cc 5641
Error C2065 'degChar': undeclared identifier energypluslib C:\energyplusbuild\sourcecode\src\EnergyPlus\OutputReportTabular.cc 5726
Error C2661 'EnergyPlus::OutputReportPredefined::PreDefTableEntry': no overloaded function takes 2 arguments energypluslib C:\energyplusbuild\sourcecode\src\EnergyPlus\OutputReportTabular.cc 5726
Error C2065 'degChar': undeclared identifier energypluslib C:\energyplusbuild\sourcecode\src\EnergyPlus\OutputReportTabular.cc 5729
Error C2661 'EnergyPlus::OutputReportPredefined::PreDefTableEntry': no overloaded function takes 2 arguments energypluslib C:\energyplusbuild\sourcecode\src\EnergyPlus\OutputReportTabular.cc 5729
Severity Code Description Project File Line Suppression State
Error C2661 'EnergyPlus::OutputReportPredefined::PreDefTableEntry': no overloaded function takes 2 arguments energypluslib C:\energyplusbuild\sourcecode\src\EnergyPlus\OutputReportTabular.cc 5943
Error C2065 'degChar': undeclared identifier energypluslib C:\energyplusbuild\sourcecode\src\EnergyPlus\OutputReportTabular.cc 5943
Severity Code Description Project File Line Suppression State
Error LNK1104 cannot open file '..\..\Products\Debug\energypluslib.lib' energyplusapi C:\energyplusbuild\build\src\EnergyPlus\LINK 1
Error LNK1104 cannot open file '..\..\Products\Debug\energyplusapi.lib' energyplus C:\energyplusbuild\build\src\EnergyPlus\LINK 1
Cmake shows:
Selecting Windows SDK version to target Windows 10.0.17134.
The C compiler identification is MSVC 19.0.24215.1
The CXX compiler identification is MSVC 19.0.24215.1
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX ...
Which commit are you trying to build? FYI, I just successfully built the latest develop (771c379) right now.
Feel free to drop by the Unmet Hours Slack Channel (see instructions here) to get help on this.