You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are experiencing the following when compiling under Visual Studio 2012 with a Windows Kit installed. test.cpp has a using namespace CryptoPP.
The practical problem for us is, main must not be in a namespace. It looks like we need to proxy main. That is, we provide an global main for C++, and then a CryptoPP::Test::main to avoid using namespace CryptoPP. Also see Windows and "error C2872: 'byte' : ambiguous symbol" on the user list.
2> test.cpp
2>test.cpp(461): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(480): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(566): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(584): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(595): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(618): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(630): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(631): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(632): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(636): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(686): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(687): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(688): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(692): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
2>test.cpp(863): error C2872: 'byte' : ambiguous symbol
2> could be 'c:\program files (x86)\windows kits\8.0\include\shared\rpcndr.h(164) : unsigned char byte'
2> or 'c:\users\cryptopp-fork\config.h(203) : CryptoPP::byte'
We are experiencing the following when compiling under Visual Studio 2012 with a Windows Kit installed.
test.cpp
has ausing namespace CryptoPP
.The practical problem for us is,
main
must not be in a namespace. It looks like we need to proxymain
. That is, we provide an globalmain
for C++, and then aCryptoPP::Test::main
to avoidusing namespace CryptoPP
. Also see Windows and "error C2872: 'byte' : ambiguous symbol" on the user list.Also see Test C++17 byte change with dry runs from various projects
The text was updated successfully, but these errors were encountered: