llvm-mingw icon indicating copy to clipboard operation
llvm-mingw copied to clipboard

reference to 'byte' is ambiguous

Open wmjb opened this issue 1 year ago • 2 comments

In file included from C:/usr/local/include/winsock2.h:23: In file included from C:/usr/local/include/windows.h:97: In file included from C:/usr/local/include/winscard.h:10: In file included from C:/usr/local/include/wtypes.h:13: In file included from C:/usr/local/include/ole2.h:17: In file included from C:/usr/local/include/objbase.h:66: C:/usr/local/include/objidl.h:8961:5: error: reference to 'byte' is ambiguous 8961 | byte *reserved1, | ^ C:/usr/local/include/rpcndr.h:93:25: note: candidate found by name lookup is 'byte' 93 | typedef unsigned char byte; | ^ C:/usr/local/include/c++/v1/cstddef:71:12: note: candidate found by name lookup is 'std::byte' 71 | enum class byte : unsigned char {};

wmjb avatar Nov 01 '24 22:11 wmjb

We can’t really do much based on such error messages - you’ll need to provide the minimal input for reproducing the failure.

mstorsjo avatar Nov 01 '24 23:11 mstorsjo

Does this line in your code?

using namespace std;

QianNangong avatar Nov 26 '24 02:11 QianNangong

solely based off error provided it looks like multiple defintions of byte and compiler cant decide which one to use you may need be more specific this solely based of what you shared and may not be totallly accurate without knowing more it is hard to say

corbettknowles avatar Mar 29 '25 15:03 corbettknowles