Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Compiling and using freetrackclient.c #1806

Open
Nive4315 opened this issue Feb 14, 2024 · 1 comment
Open

Issue Compiling and using freetrackclient.c #1806

Nive4315 opened this issue Feb 14, 2024 · 1 comment

Comments

@Nive4315
Copy link

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.

@sthalik
Copy link
Member

sthalik commented Feb 14, 2024

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));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants