- Posts: 10
SAM Open Source Compilation Problem
- jranalli
- Topic Author
Less
More
11 Mar 2018 17:42 #6127
by jranalli
SAM Open Source Compilation Problem was created by jranalli
I'm having some trouble compiling the SAM open source SSC. I'm working with Visual Studio Community Edition 2017, updated to the latest version today, in Windows 10. I followed the instructions from the Wiki all along, successfully compiled wxWidgets, GoogleTest, lk, and wex. The SSC Solution compiles up through solarpilot. On solarpilot I get the following two compile errors:
I've attached the output from the compiler, which may be more instructive. It appears that it comes from autopilot_api.cpp.
I have to admit that I'm not C++ savvy enough to completely understand this error, and so I'm finding that I'm a little stuck. Can anybody help me so that I can continue the compile?
Code:
Severity Code Description Project File Line Suppression State
Error C2664 'const _Kty &std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>::_Kfn<const _Kty,_Ty>(const std::pair<const _Kty,_Ty> &)': cannot convert argument 1 from 'std::pair<const _Kty,_Ty>' to 'const std::pair<const _Kty,_Ty> &' solarpilot d:\programfiles\visual studio community 2017\vc\tools\msvc.13.26128\include\xhash 658
Code:
Severity Code Description Project File Line Suppression State
Error C2664 'const _Kty &std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>::_Kfn<const _Kty,_Ty>(const std::pair<const _Kty,_Ty> &)': cannot convert argument 1 from 'std::pair<const _Kty,_Ty>' to 'const std::pair<const _Kty,_Ty> &' solarpilot d:\programfiles\visual studio community 2017\vc\tools\msvc.13.26128\include\xhash 660
I've attached the output from the compiler, which may be more instructive. It appears that it comes from autopilot_api.cpp.
I have to admit that I'm not C++ savvy enough to completely understand this error, and so I'm finding that I'm a little stuck. Can anybody help me so that I can continue the compile?
Please Log in or Create an account to join the conversation.
- jranalli
- Topic Author
Less
More
- Posts: 10
13 Mar 2018 04:49 #6128
by jranalli
Replied by jranalli on topic SAM Open Source Compilation Problem
With some help from a friend, I've identified a fix for the problem. It's within the AutoPilot_API.cpp file. There's an anonymous class with an internal struct (_inst). Moving that struct out to the top level allows the file to compile. Said friend suggests that it may be a bug within the standard library from MS rather than a problem with this code. Either way, is there someone I can contact on the Dev team to explain the issue I encountered in detail, so that if others have the problem it's documented?
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
14 Mar 2018 10:34 #6129
by pgilman
Replied by pgilman on topic SAM Open Source Compilation Problem
Hello,
It looks like this problem is documented here, and resolved:
github.com/NREL/ssc/pull/142
Best regards,
Paul.
It looks like this problem is documented here, and resolved:
github.com/NREL/ssc/pull/142
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- jranalli
- Topic Author
Less
More
- Posts: 10
15 Mar 2018 10:41 #6130
by jranalli
Replied by jranalli on topic SAM Open Source Compilation Problem
Fantastic thanks!
Please Log in or Create an account to join the conversation.
Moderators: pgilman