Errors with compiling OpenStudio source code
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.
When using CMake GUI, did you
Configure
AND thenGenerate
? That went well?Have you installed the required Visual Studio and CMake versions? 2013 Commnunity + Update 5, CMake 3.7? Versions are important.
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?
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.
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 tox64
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.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.