# Is it possible to compile RakNet using UE4?

**URL:** <https://forums.unrealengine.com/t/is-it-possible-to-compile-raknet-using-ue4/303813>\
**Category:** C++\
**Tags:** third-party-librarie, compiling, unreal-engine, question\
**Created:** [January 13, 2015, 9:14am UTC](https://forums.unrealengine.com/t/is-it-possible-to-compile-raknet-using-ue4/303813 "2015-01-13T09:14:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbprofi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@newbprofi](https://forums.unrealengine.com/u/newbprofi)\
**Post date:** [January 13, 2015, 9:14am UTC](https://forums.unrealengine.com/t/is-it-possible-to-compile-raknet-using-ue4/303813/1 "2015-01-13T09:14:31Z")

</div>

Can anyone help me how to add RakNet ([GitHub - facebookarchive/RakNet: RakNet is a cross platform, open source, C++ networking engine for game programmers.](https://github.com/OculusVR/RakNet)), to UE4/Source/ThirdParty and to make RakNet.Build.cs?

Do i need precompiled RakNet/Libs? Can i compile them using UE4?

---

<div class="post-metadata">

**Author:** ![newbprofi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@newbprofi](https://forums.unrealengine.com/u/newbprofi)\
**Post date:** [January 13, 2015, 12:54pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-compile-raknet-using-ue4/303813/2 "2015-01-13T12:54:14Z")

</div>

Steps to add RakNet (release) to UE4:

- Download RakNet.

- Copy “RakNet-master” folder to “UE4/Engine/Source/ThirdParty/RakNet/”.

- Create there “RakNet.Build.cs”

- Open RakNet\_VS2008.sln with VS2013. Conversion will be automatically fine.

- Set build mode “Release” / “x64”.

- Change “LibStatic” project properties: C/C++/CodeGeneration/Runtime Library = Multi-threaded DLL (taken from [A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums](https://wiki.unrealengine.com/Linking_Static_Libraries_Using_The_Build_System))

- Build “LibStatic”.

- Add to your “Project.Build.cs” following:

---

<div class="post-metadata">

**Author:** ![XAfgun\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@XAfgun\_1](https://forums.unrealengine.com/u/XAfgun_1)\
**Post date:** [March 4, 2015, 6:00am UTC](https://forums.unrealengine.com/t/is-it-possible-to-compile-raknet-using-ue4/303813/3 "2015-03-04T06:00:44Z")

</div>

I got 156 error same as

Error 1 error C2872: ‘INT’ : ambiguous symbol C:\Program Files (x86)\Windows Kits\8.1\include\shared\ws2def.h 249 1

Error 10 error C2872: ‘INT’ : ambiguous symbol or ‘e:\unreal engine 4.7\unrealengine\engine\source\runtime\core\public\Misc/DisableOldUETypes.h(28) : DoNotUseOldUE4Type::INT’ C:\Program Files (x86)\Windows Kits\8.1\include\shared\ws2def.h 674 1

Error 20 error C2872: ‘DWORD’ : ambiguous symbol C:\Program Files (x86)\Windows Kits\8.1\include\um\WinSock2.h 942 1

---

<div class="post-metadata">

**Author:** ![newbprofi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@newbprofi](https://forums.unrealengine.com/u/newbprofi)\
**Post date:** [March 5, 2015, 7:12pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-compile-raknet-using-ue4/303813/4 "2015-03-05T19:12:15Z")

</div>

You need to use special UE4 includes wrapped around to Raknet includes:

```
#include "AllowWindowsPlatformTypes.h" // UE4

#include "RakPeerInterface.h"
#include "MessageIdentifiers.h"
#include "BitStream.h"
#include "RakNetTypes.h"
#include "Rand.h"

#include "HideWindowsPlatformTypes.h" // UE4
```

---

<div class="post-metadata">

**Author:** ![DiGiCT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DiGiCT](https://forums.unrealengine.com/u/DiGiCT)\
**Post date:** [March 20, 2015, 7:21pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-compile-raknet-using-ue4/303813/5 "2015-03-20T19:21:41Z")

</div>

Can you explain it more specific ?  
“Add to your “Project.Build.cs” following:” where is this file?  
I did conversion to vs2013 the multidll was already selected for me and the build went without errors, just i dont have the file you mention to add that last line, when i start UE4 and go to the plugins it does not show up.  
Please Help

---

<div class="post-metadata">

**Author:** ![newbprofi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@newbprofi](https://forums.unrealengine.com/u/newbprofi)\
**Post date:** [March 28, 2015, 4:22am UTC](https://forums.unrealengine.com/t/is-it-possible-to-compile-raknet-using-ue4/303813/6 "2015-03-28T04:22:10Z")

</div>

Create any new project in UE4 and you will have in VisualStudio following file inside your project → NameOfYourProject.Build.cs.

---

<div class="post-metadata">

**Author:** ![DiGiCT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DiGiCT](https://forums.unrealengine.com/u/DiGiCT)\
**Post date:** [March 29, 2015, 1:31am UTC](https://forums.unrealengine.com/t/is-it-possible-to-compile-raknet-using-ue4/303813/7 "2015-03-29T01:31:48Z")

</div>

Thanks, I got that file and added that line in there.  
All goes fine but the plugin still does not show up in my plugins list though :S  
I get no compile errors when i compile it, still no plugin showing up in my plugin browser, only the ones which come with unreal.  
I wonder if someone could help me out getting this plugin inside UE4 working, as my game needs a lobby server to browse the games, unfortunetly UE4 only support that with steam, which i dont realy like to use, as they decide to release your game or not.  
I use unity as well but i like UE4 more, just the networking is still behind with features.  
Anyone can help me out to get this plugin working i would apreciate.

---

<div class="post-metadata">

**Author:** ![DiGiCT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DiGiCT](https://forums.unrealengine.com/u/DiGiCT)\
**Post date:** [March 31, 2015, 10:59am UTC](https://forums.unrealengine.com/t/is-it-possible-to-compile-raknet-using-ue4/303813/8 "2015-03-31T10:59:49Z")

</div>

@ newbprofi Did you get it compiled as a plugin ?  
Could you share the plugin or make a clear how to do this as I am still stuck.  
It would help a lot of people if we would more easy understand.  
My coding skill is at a very low level (as others) please help us out.

---

<div class="post-metadata">

**Author:** ![newbprofi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@newbprofi](https://forums.unrealengine.com/u/newbprofi)\
**Post date:** [April 1, 2015, 3:02am UTC](https://forums.unrealengine.com/t/is-it-possible-to-compile-raknet-using-ue4/303813/9 "2015-04-01T03:02:09Z")

</div>

its not plugin.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d3af3c29](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d3af3c29](https://forums.unrealengine.com/u/anonymous_user_d3af3c29)\
**Post date:** [April 19, 2016, 7:56pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-compile-raknet-using-ue4/303813/10 "2016-04-19T19:56:44Z")

</div>

There is a new rakenet plugin example on github, not sure if it works but might be helpful.

---

<div class="post-metadata">

**Author:** ![DiGiCT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DiGiCT](https://forums.unrealengine.com/u/DiGiCT)\
**Post date:** [April 19, 2016, 9:05pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-compile-raknet-using-ue4/303813/11 "2016-04-19T21:05:30Z")

</div>

Where is the Link please ???  
is it this one ?

> **[GitHub - yujen/RN4UE4: RakNet plugin for Unreal Engine 4](https://github.com/yujen/RN4UE4)**
>
> :video\_game: RakNet plugin for Unreal Engine 4. Contribute to yujen/RN4UE4 development by creating an account on GitHub.
