opentrack
opentrack copied to clipboard
Issue Compiling and using freetrackclient.c
Hi, I'm currently trying to compile a copy of freetrackclient.c within my own application so I can access the live data; however, I'm running into an issue. While including the freetrackclient.c and ftttypes.h in my own code file, I get the following error with memcpy (see below).
freetrackclient.c, line 79,
Severity Code Description Error C2664 'void *memcpy(void *,const void *,size_t)': cannot convert argument 1 from 'FTData *' to 'void *'
I'm not sure if there's an issues with the code or if I'm doing something boneheaded (I'm fairly new to C++, so probably the later!!!) I'd appreciate any guidance in resolving the issue.
The MSVC error message doesn't make sense in C or C++ modes. Maybe the switch -std:c11
can help you.
In any case, add (void*)
before the first argument, as such:
memcpy((void*)data, &ipc_heap->data, sizeof(FTData));