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

Build EnergyPlus from source code in VS 2015 doesn't work

asked 2018-09-11 05:16:00 -0500

CHARLIE1188's avatar

updated 2018-09-12 02:18:52 -0500

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 ...
(more)
edit retag flag offensive close merge delete

Comments

Which commit are you trying to build? FYI, I just successfully built the latest develop (771c379) right now.

Julien Marrec's avatar Julien Marrec  ( 2018-09-12 02:24:08 -0500 )edit

Feel free to drop by the Unmet Hours Slack Channel (see instructions here) to get help on this.

Julien Marrec's avatar Julien Marrec  ( 2018-09-12 02:31:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-09-12 16:40:25 -0500

The source code lines which are generating the "newline in constant" errors all contain extended characters such as a degree symbol and accented characters. Looks like an encoding problem based on these links: https://github.com/libusb/libusb/issu... https://msdn.microsoft.com/en-us/libr...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2018-09-11 05:16:00 -0500

Seen: 328 times

Last updated: Sep 12 '18