Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

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 compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.18.0.windows.1") Found PythonInterp: C:/Python27/python.exe (found suitable version "2.7.15", minimum required is "2.7")

Looking for dlfcn.h

Looking for dlfcn.h - not found

Looking for fcntl.h Looking for fcntl.h - found Looking for inttypes.h Looking for inttypes.h - found Looking for memory.h Looking for memory.h - found Looking for stdint.h Looking for stdint.h - found Looking for stdlib.h Looking for stdlib.h - found

Looking for strings.h

Looking for strings.h - not found

Looking for string.h Looking for string.h - found Looking for sys/stat.h Looking for sys/stat.h - found Looking for sys/types.h Looking for sys/types.h - found

Looking for unistd.h

Looking for unistd.h - not found

Looking for getpagesize

Looking for getpagesize - not found

Looking for bcopy

Looking for bcopy - not found

Looking for memmove Looking for memmove - found

Looking for mmap

Looking for mmap - not found

Looking for off_t

Looking for off_t - not found

Looking for size_t

Looking for size_t - not found

Looking for stddef.h Looking for stddef.h - found

Check size of off64_t

Check size of off64_t - failed

Looking for fseeko

Looking for fseeko - not found

Looking for unistd.h

Looking for unistd.h - not found

Looking for pthread.h

Looking for pthread.h - not found

Found Threads: TRUE
Performing Test COMPILER_HAS_DEPRECATED_ATTR Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed Performing Test COMPILER_HAS_DEPRECATED Performing Test COMPILER_HAS_DEPRECATED - Success Configuring done Generating done

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

State Error LNK1104 cannot open file '....\Products\Debug\energypluslib.lib' '..\..\Products\Debug\energypluslib.lib' energyplusapi C:\energyplusbuild\build\src\EnergyPlus\LINK 1

Error LNK1104 cannot open file '....\Products\Debug\energyplusapi.lib' '..\..\Products\Debug\energyplusapi.lib' energyplus C:\energyplusbuild\build\src\EnergyPlus\LINK 1

1

Cmake shows:

Selecting Windows SDK version  to target Windows 10.0.17134.

10.0.17134. The C compiler identification is MSVC 19.0.24215.1

19.0.24215.1 The CXX compiler identification is MSVC 19.0.24215.1

19.0.24215.1 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe

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

info Detecting C compiler ABI info - done

done Detecting C compile features

features Detecting C compile features - done

done Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe

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 compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.18.0.windows.1") Found PythonInterp: C:/Python27/python.exe (found suitable version "2.7.15", minimum required is "2.7")

Looking for dlfcn.h

Looking for dlfcn.h Looking for dlfcn.h - not found

found Looking for fcntl.h Looking for fcntl.h - found Looking for inttypes.h Looking for inttypes.h - found Looking for memory.h Looking for memory.h - found Looking for stdint.h Looking for stdint.h - found Looking for stdlib.h Looking for stdlib.h - found

Looking for strings.h

found Looking for strings.h Looking for strings.h - not found

found Looking for string.h Looking for string.h - found Looking for sys/stat.h Looking for sys/stat.h - found Looking for sys/types.h Looking for sys/types.h - found

Looking for unistd.h

found Looking for unistd.h Looking for unistd.h - not found

Looking for getpagesize

found Looking for getpagesize Looking for getpagesize - not found

Looking for bcopy

found Looking for bcopy Looking for bcopy - not found

found Looking for memmove Looking for memmove - found

Looking for mmap

found Looking for mmap Looking for mmap - not found

Looking for off_t

found Looking for off_t Looking for off_t - not found

Looking for size_t

found Looking for size_t Looking for size_t - not found

found Looking for stddef.h Looking for stddef.h - found

found Check size of off64_t

off64_t Check size of off64_t - failed

Looking for fseeko

failed Looking for fseeko Looking for fseeko - not found

Looking for unistd.h

found Looking for unistd.h Looking for unistd.h - not found

Looking for pthread.h

found Looking for pthread.h Looking for pthread.h - not found

found Found Threads: TRUE
Performing Test COMPILER_HAS_DEPRECATED_ATTR Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed Performing Test COMPILER_HAS_DEPRECATED Performing Test COMPILER_HAS_DEPRECATED - Success Configuring done Generating done

done