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
Project Settings add following:
C/C++ > General > Additional Include Directories
- 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.
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)
.libfiles in your Debug libs folder to
Linker > Input > Additional Dependenciesfor 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.
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!