[chbot] Stuck on a C++ problem
Robin Gilks
robin at gilks.org
Mon Jan 21 00:08:44 GMT 2019
> It's saying that it doesn't know how to convert this:
>
> { false,false,false,false,0x00,0x00,"Reset Enable" };
>
> Into one of these:
>
> std::map<long long unsigned int,CommandAttr>:
>
This gave me a clue but since this is existing code from github that
supposedly works fine then I had to look a little deeper.
Changing the structure definition from
struct CommandAttr {
bool AcceptsAddr;
bool UsesDummyCycles;
bool HasData;
bool isWrite;
int AddressLineMask;
int DataLineMask;
char CommandName[128];
};
to
struct CommandAttr {
bool AcceptsAddr;
bool UsesDummyCycles;
bool HasData;
bool isWrite;
int AddressLineMask;
int DataLineMask;
std::string CommandName;
};
has fixed it - no idea how or why, other than some vague hints from a
StackOverflow item.
I guess its a VisualC++ to g++ issue (only windows libs are on the github
repository so maybe that is that was tested!)
--
Robin Gilks
More information about the Chchrobotics
mailing list