Although Raknet is cross-platform, not all of the samples provided will compile/run on Mac OS X or iOS.
Here I'll show you how to compile Raknet for Mac OS X and iOS, along with one of the samples for testing
|Compiling as a static library for Mac OS X|
Create an empty workspace
Create the RakNet static library project
|Testing the static library|
A simple sample...For testing, we're going to use the sample "Chat Example" provided with the Raknet. You can find it the "Samples/Chat Example" folder. This sample has 2 source files, named "Chat Example Server.cpp" and "Chat Example Client.cpp". We are going to create two projects from those files (one project for the Server, and another for the Client).
Inside the folder where you have your workspace, create another folder named Samples, and copy "Chat Example Server.cpp" and "Chat Example Client.cpp" into that folder.
The ClientThe steps to create the client project are the same as the ones for the Server:
Running the sampleYou should now have 2 products ready to run (ChatExampleClient and ChatExampleServer). You can run one of them from inside Xcode, and run the other externally by right-clicking on it and selecting "Open With External Editor".
|Compiling as a static library for iOS|
Compiling Raknet as a static library for iOS is essentially the same as for Mac OS X.|
You can create a new project for the iOS library, or you can just create another Target for your Mac OS X static library project, and change what SDK to use:
You can find some iOS samples in the Samples/iOS folder.