Complete Steps for Developing with the C++ Client in Visual Studio

The setup instructions for working with the C++ Client in Visual Studio are a bit incomplete. I’ve added some details that might be helpful to new developers.

Setup for Visual Studio projects

In Project Settings add following:

  1. Add NAKAMA_CPP_SDK/include in C/C++ > General > Additional Include Directories
  2. Add libs folder in Linker > General > Additional Library Directories:
  • NAKAMA_CPP_SDK/libs/win32/v140 - for VS 2015 x86
  • NAKAMA_CPP_SDK/libs/win64/v140 - for VS 2015 x64
  • NAKAMA_CPP_SDK/libs/win32/v141 - for VS 2017 x86
  • NAKAMA_CPP_SDK/libs/win64/v141 - for VS 2017 x64
  • NAKAMA_CPP_SDK/libs/win32/v142 - for VS 2019 x86
  • NAKAMA_CPP_SDK/libs/win64/v142 - for VS 2019 x64
    Add the Debug Folder to your Debug Configuration and the Release Folder to your Release Configuration.
    For Example, add “NAKAMA_CPP_SDK/libs/win64/v142/Release” to your Release Configuration and “NAKAMA_CPP_SDK/libs/win64/v142/Debug” to your Debug Configuration.
  1. Do the same as above for “NAKAMA_CPP_SDK/shared-libs” (select the proper subfolder for your version, and add debug and release folder to the appropriate configuration)

  2. Add the .lib files in your Debug libs folder to Linker > Input > Additional Dependencies for your Debug configuration. Also add the .lib in “shared-libs.” Only type the file names here. Not the full path. Do the same for your Release libs in your Release configuration.

  3. Copy “nakama-cppd.dll” and “nakama-cpp.dll” from the appropriate “shared-libs” folder into your project folder.

There may be other ways to get the VS to find the .dll but this method worked for me.

Hope that helps!

2 Likes

Thanks @mehoo – I’ll eyeball this against the current README.md and change where appropriate.

1 Like

Thanks Luke! I’m glad I was able to get it running. I learned a lot about stuff I should probably know about anyway.

If there’s a better way to do it, (especially with the .dll’s) please let me know.