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

UE4 compatibility #43

Open
jvukovich opened this issue Nov 27, 2018 · 7 comments
Open

UE4 compatibility #43

jvukovich opened this issue Nov 27, 2018 · 7 comments
Assignees

Comments

@jvukovich
Copy link

Hey man (Ascentroid here)!

My game uses UE4 with RakNet integrated. Almost done upgrading from the larku RakNet fork to SLikeNet. I ran into a snag.

UE4 uses the same SHA1 functions by Dominik Reichl:
http://api.unrealengine.com/INT/API/Runtime/Core/Misc/SHA1_WORKSPACE_BLOCK/

SLikeNet:
source/include/slikenet/DR_SHA1.h

When compiling, it throws an error saying SHA1_WORKSPACE_BLOCK is already defined.

I fixed it by commenting out the SLikeNet definition (the signatures are the same). It worked just fine.

I wanted to report it in case there is anything that could be done to resolve the conflict without me having to edit the source.

Thanks!

@Luke1410 Luke1410 self-assigned this Dec 3, 2018
@Luke1410
Copy link
Member

Luke1410 commented Dec 3, 2018

Hi,

sorry for the late reply. We've been working heavily on a game release last friday which includes SLikeNet.

could you look up the corresponding UE4 header for me? The header is using a ifdef-include guard:
#ifndef SHA1_H_A545E61D43E9404E8D736869AB3CBFE7

Is the UE4 version using a different one?

Regards,
Stefan

@jvukovich
Copy link
Author

jvukovich commented Dec 4, 2018

No problem man! I can get by with commenting it out for now. :)

Here is the UE4 header:
SecureHash.txt

Taken from UE4 4.19.2 -- Engine/Source/Runtime/Core/Public/Misc/SecureHash.h

Doesn't look like they have a def in place. I think they plopped it into their own stuff and stripped out those things.

@Luke1410
Copy link
Member

Luke1410 commented Dec 4, 2018

Thanks for the header. I see. It indeed looks like they stripped out part of the code they deemed necessary for UE4 without providing means to circumvent this for other libraries also using the original headers.

Given this is from the UE4, I think we'd deal with the situation on our end. I don't have much experience with UE4 yet myself. Do you know wether UE4 provides a macro/define to identify that UE4 is used? We'd then adjust our integration of the SHA-1 algorithm to work around the identifier issue.

@jvukovich
Copy link
Author

jvukovich commented Dec 5, 2018

Cool, thanks man!

I tried to find an overall UE4 define for the engine, but no luck.

The best I could find was in Engine/Source/Runtime/Engine/Public/EngineDefines.h
EngineDefines.txt

Perhaps WORLD_MAX? Not very specific to UE4 terminology, though. :(

@Luke1410
Copy link
Member

Luke1410 commented Dec 5, 2018

nah, that doesn't sound like a reasonable one for the purpose --- guess I'll have to peek into the UE4 source to see if there's some more reasonable way for that --- I understand it's nothing too urgent for you? If it is, pls let me know --- I'd then commit a change which would require adding a specific define to prevent the identifier glitch with UE4

@jvukovich
Copy link
Author

Nope, not urgent! I'm good with commenting/uncommenting as needed in order to compile for now.

Just thought I'd get it reported since we've been seeing a number of folks using UE4 in Discord, in addition to myself.

Thanks again man!

@Rizzist
Copy link

Rizzist commented Mar 16, 2023

Hey if possible can u give help how u installed it to ue4? struggling to use this 3rd party software

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

No branches or pull requests

3 participants