Jump to content

Recommended Posts

Posted

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

Posted (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 by cl-

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...