![]() |
Error: cannot convert from (__clrcall *) to (__cdecl *)
I am compiling in Visual C++ 2005 Express Edition.
I am getting the following error: error C2440: '=' : cannot convert from 'void (__clrcall sept05::Form1::* )(pjsua_call_id)' to 'void (__cdecl *) (pjsua_call_id)' Please help. Thanks. Following is the code that is causing the error: Code:
#pragma once |
Re: Error: cannot convert from (__clrcall *) to (__cdecl *)
Is cfg.cb of type 'void (__clrcall sept05::Form1::* )(pjsua_call_id)'? I can't tell, because pjsua_config is defined in code you haven't posted. If not, then there's the reason for the error, and you need to change the type or do a cast.
BTW, if you use code tags when you post, it retains formatting. The above is pretty unreadable as all the indenting has been removed. |
Re: Error: cannot convert from (__clrcall *) to (__cdecl *)
Or use a compile flag that tells the compiler to stop being so whiny about a simple function address assignment. Or tell us you weren't trying to assign the address of the function to cfg.cb.on_call_media_state but were instead trying to call the function and assign the return value :-)
Oh and I should have asked for the type of cfg.cb.on_call_media_state, not cfg.cb. |
| All times are GMT +5.5. The time now is 03:39. |