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

Errors with compiling OpenStudio source code

asked 2017-01-31 20:37:05 -0500

updated 2017-02-01 03:38:16 -0500

I've downloaded the OpenStudio 2.0.1 source code from GitHub. To configure the source code in Windows, I went through the steps on this page. I had some issues with cloning the OpenStudio repository however, I managed to use CMake to configure the source code without any problem.

But, when I tried to build the solution in Visual Studio to generate the OpenStudio executable file, it returned so many errors, which are mostly due to missing .hxx files in utilities/idd folder. It seems it cannot find any .cpp files. There are also other classes that cannot be identified.

There are also errors like this "Unknown compiler version - please run the configure tests and report the results".

Attached you can see the screenshot of errors.

Is there anybody, who has experienced similar issues? Any suggestion?

I appreciate any help with that.

image description image description

During Building.png After Building.PNG

edit retag flag offensive close merge delete

Comments

When using CMake GUI, did you Configure AND then Generate? That went well?

Have you installed the required Visual Studio and CMake versions? 2013 Commnunity + Update 5, CMake 3.7? Versions are important.

Julien Marrec's avatar Julien Marrec  ( 2017-02-01 03:10:55 -0500 )edit

Yes, Julien. I did configure and generate. I've done it once for EnergyPlus source code and I'm kind of sure the Makefile is generated properly... I'm using Visual Studio 2015, 14, Update 3 though. Should I install the older version or should I simply choose 2013 when it asks in CMake? (There is no 2013 option available though) ... I'm using CMake 3.7... Beside, CMake had issues recognizing Boost libraries. I had to put the address manually. Could it be any compatibility issues with Boost's versions?

Ehsank's avatar Ehsank  ( 2017-02-01 10:29:13 -0500 )edit

I would think this is because of your Visual Studio version. The first time I tried building OS I had downloaded newer versions thinking the documentation (wiki) was outdated. I had to start from scratch and use the actual (old) versions listed before it could work.

@macumber or @Kyle Benne can help maybe.

Julien Marrec's avatar Julien Marrec  ( 2017-02-02 02:02:30 -0500 )edit

We have not yet moved OpenStudio to Visual Studio 2015 although there is interest in that. At the current time I would suggest using Visual Studio Community 2013. You will need to set the PreferredToolArchitecture environment variable to x64 as noted here. This tells Visual Studio to use the 64 bit version of link.exe which is required when building some of the larger modules.

macumber's avatar macumber  ( 2017-02-02 10:47:04 -0500 )edit

Also, OpenStudio 2.0 downloads and uses precompiled versions of boost, Qt, and Ruby. You should not try to configure CMake to use other installations for these dependencies.

macumber's avatar macumber  ( 2017-02-02 10:48:08 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-02-03 10:28:59 -0500

We have not yet moved OpenStudio to Visual Studio 2015 although there is interest in that. At the current time I would suggest using Visual Studio Community 2013. You will need to set the PreferredToolArchitecture environment variable to x64 as noted here. This tells Visual Studio to use the 64 bit version of link.exe which is required when building some of the larger modules.

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: 2017-01-31 20:37:05 -0500

Seen: 395 times

Last updated: Feb 03 '17