SFS2X Docs / GettingStarted / client-api-cpp-windows-vstudio2010
» Client API setup | C++
» Windows — Visual Studio 2010
» Libraries compilation
To compile the required libraries you need Microsoft Visual Studio 2010 SP1 to be installed on your computer.
Open a Windows Command Prompt on the file system path [api_folder]\Core\BoostAsio\Windows; type in bootstrap and wait for command execution.
When completed, type in one-by-one the follow commands:
> b2 -a toolset=msvc-10.0 threading=multi link=static
runtime-link=shared --with-system stage
> b2 -a toolset=msvc-10.0 threading=multi link=static runtime-link=shared
--with-date_time stage
> b2 -a toolset=msvc-10.0 threading=multi link=static runtime-link=shared
--with-chrono stage
> b2 -a toolset=msvc-10.0 threading=multi link=static runtime-link=shared
--with-regex stage
> b2 -a toolset=msvc-10.0 threading=multi link=static runtime-link=shared
--with-thread stage
If all has been done with success, you will find out that a new directory
named [api_folder]\Core\BoostAsio\Windows\stage\lib has been
created, containing ten .lib files.
The Windows Command Prompt can now be closed.
Start Microsoft Visual Studio 2010 and open the solution SmartFoxClientApi contained in [api_folder]\SmartFoxClientApi\VS2010.
Perform a Rebuild Solution for both Debug and Release configurations.The SmartFoxClientApi solution can then be closed.
» Setting up an SFS2X project
Move to the project settings of your Microsoft Visual Studio 2010 client application. Select General options into the C/C++ section and add the [api_folder]\Core\BoostAsio\Windows path to the Additional Include Directories for both Debug and Release configurations.Now select General options into the Linker
section.
Add the [api_folder]\Core\BoostAsio\Windows\stage\lib path to
Additional Library Directories for both Debug and Release configurations.
Add the [api_folder]\Deploy\VisualStudio2010\Debug path to
Additional Library Directories for Debug configurations.
Add the [api_folder]\Deploy\VisualStudio2010\Release path to
Additional Library Directories for Release configurations.
Select Input options into the Linker section and add SmartFoxClientApi.lib to Additional Dependancies for both Debug and Release configurations.
You can now start using the SmartFoxServer 2X API in your project.