ROSIntegration icon indicating copy to clipboard operation
ROSIntegration copied to clipboard

Error: no matching member function for call to 'AddRaw'

Open adarshjamuaar opened this issue 2 years ago • 1 comments

Hi, The plugin works fine during development but when I try to build it for my Quest 3, I get two errors.

  1. Issue related to AddRaw

/Plugins/ROSIntegration-master/Source/ROSIntegration/Private/rosbridge2cpp/WebsocketConnection.cpp(64,28): error: no matching member function for call to 'AddRaw' WebSocket->OnRawMessage().AddRaw(this, &WebsocketConnection::OnRawMessage); ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ UnrealEngine/Engine/Source/Runtime/Core/Public/Delegates/DelegateSignatureImpl.inl(753,25): note: candidate function [with UserClass = WebsocketConnection, VarTypes = <>] not viable: no known conversion from 'void (WebsocketConnection::*)(const void , size_t, size_t)' to 'typename TMemFunPtrType<false, WebsocketConnection, void (const void , unsigned long long, unsigned long long)>::Type' (aka 'void (WebsocketConnection::)(const void , unsigned long long, unsigned long long)') for 2nd argument inline FDelegateHandle AddRaw(UserClass InUserObject, typename TMemFunPtrType<false, UserClass, void (ParamTypes..., VarTypes...)>::Type InFunc, VarTypes... Vars) ^ UnrealEngine/Engine/Source/Runtime/Core/Public/Delegates/DelegateSignatureImpl.inl(760,25): note: candidate function [with UserClass = WebsocketConnection, VarTypes = <>] not viable: no known conversion from 'void (WebsocketConnection::)(const void *, size_t, size_t)' to 'typename TMemFunPtrType<true, WebsocketConnection, void (const void , unsigned long long, unsigned long long)>::Type' (aka 'void (WebsocketConnection::)(const void , unsigned long long, unsigned long long) const') for 2nd argument inline FDelegateHandle AddRaw(const UserClass InUserObject, typename TMemFunPtrType<true, UserClass, void (ParamTypes..., VarTypes...)>::Type InFunc, VarTypes... Vars) ^ 2. Issue related to Exception handling

Plugins/ROSIntegration-master/Source/ROSIntegration/Private/rosbridge2cpp/WebsocketConnection.cpp(110,2): error: cannot use 'try' with exceptions disabled try { ^

I have succeeded in removing all other errors but I am stuck with these two now. Please help me to resolve this. I am using UE 5.0.3

adarshjamuaar avatar Jan 31 '24 07:01 adarshjamuaar

Hi @adarshjamuaar ,

I recently made a PR that should address your second issue (with the try-catch block).

Regarding the first problem with the AddRaw method, there are actually 4 lines, 61-64, that all invoke that method. Is it just line 64 that causes the problem or do all of them throw the same error? UE5 still uses delegates, so I'm kind of confused as to what is causing the problem.

tsender avatar Feb 05 '24 16:02 tsender