PaulPaulaner Posted April 28, 2020 at 02:19 PM Posted April 28, 2020 at 02:19 PM Hi zusammen, erhalte bei der Funktion folgenden Fehler: cannot convert argument of incomplete type void * to void(*)() folgender Aufruf: ipcon_register_callback(&ipcon,IPCON_CALLBACK_ENUMERATE,(void *)cb_enumerate_static ,this); Funktion im Header wie folgt definiert: static void cb_enumerate_static(const char *uid, const char *connected_uid, char position, uint8_t hardware_version[3], uint8_t firmware_version[3], uint16_t device_identifier, uint8_t enumeration_type, void *user_data); Hat jemand eine Idee was ich da falsch mach? Programmiert wird in QT mit C++ Falls ihr noch mehr Infos bräuchtet bitte einfach melden. Danke schon mal vorab für eure Hilfe! Viele Grüße Paul Quote
cl- Posted April 28, 2020 at 04:51 PM Posted April 28, 2020 at 04:51 PM (edited) Hi Paul! Der Callback ist richtig definiert. Ist cb_enumerate_static() Teil einer Klasse oder ist es eine Funktion außerhalb? Wenn ersteres zustimmt, dann versuch mal folgendes: // register enumeration callback ipcon_register_callback(&ipcon, IPCON_CALLBACK_ENUMERATE, (void (*)(void))cb_enumerate_static, this); Edited April 28, 2020 at 04:57 PM by cl- Quote
PaulPaulaner Posted April 29, 2020 at 06:15 AM Author Posted April 29, 2020 at 06:15 AM Super Danke! Jetzt ist hab ich das verstanden 🙂 Viele Grüße Paul Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.