Compile in Visual Studio
Written by lcdr, edited by Timtech
Please note: This tutorial is outdated, and only applies if one needs to build the LUNIServer and lacks the solution file (.sln) or project settings.
Set up Visual Studio
- Install Visual Studio (VS).
- Create a new project (File/New/Project).
- Select Win32 Console Application and choose a name (to stay with LuniServer’s naming so far, you can name it “luni_test” – but I doubt this name will be the final one).
- Click OK. On the Application Wizard that shows up, check the Application Settings/Empty project checkbox.
- Click finish.
- Open all the files in the LuniServer /source/ directory in VS.
- For each file, click File/Move into/Your Project name.
Set up RakNet
- Download RakNet 3.25.
- In VS, right click your project and choose “Properties”. In the properties pane, choose Configuration Properties/C/C++/General/Additional Include Directories and insert the path to the RakNet /Source/ directory.
- Choose Configuration Properties/Linker/General/Additional Library Directories and insert the path to the RakNet /Lib/ directory.
- Choose Configuration Properties/Linker/Input/Additional Dependencies and add and ws2_32.lib. Seperate using semicolons (;).
- You might get some message like “Use of library ‘LIBCMT’ conflicts with other libraries” on compilation. This is not fatal, but to remove the annoying line of text, you can add LIBCMT to Configuration Properties/Linker/Input/Ignore Specific Default Libraries.
- Click OK to close the properties panel.
- Right click your project and choose “Build”.
- You’ll get a lot of “linking object as if no debug info” messages. Ignore them.
- Your files will be in the directory of your project /Debug/. This does not generate the config file or packet answer files needed, you you’ll have to copy them from the LuniServer directory corresponding to the function of your server.
- To modify the server, change what you need in the source files, then follow the steps from “Compilation” above.
If you’ve got any further questions after following these steps:
- Check if you set it up like in this walkthrough.
- Google your problem.
If it’s still not fixed, try asking for help in the forums.