Not able to Compile in VS 2013

Post here your questions about the C++ API for SFS2X

Moderators: Lapo, Bax, MBagnati

ramSe7en
Posts: 5
Joined: 13 Feb 2014, 17:40

Not able to Compile in VS 2013

Postby ramSe7en » 15 Feb 2014, 02:05

Hi,

Thanks for the help in advance. I am new to c++, I have used sfs AS3 client though.

For some reasons I am not able to compile neither the client-api project, not any of the examples.

I use Visual studio 2013, I don't see solution folder for the same in the downloads, I tried to use 2012 solution & upgrade it, it didn't work.

However, when I tried the 2012 solution in Visual studio 2012, I am getting this error while building.

------------------------------------------------------------------------------
Creating library x86\ZlibDllDebug\zlibwapi.lib and object x86\ZlibDllDebug\zlibwapi.exp
1> zlibvc.vcxproj -> H:\Worspace\VS2013\Frameworks\SFS2X_API_Cpp_v1.1.0\ZLib\contrib\vstudio\vc11\x86\ZlibDllDebug\zlibwapi.dll
1> A subdirectory or file H:\Worspace\VS2013\Frameworks\SFS2X_API_Cpp_v1.1.0\ZLib\contrib\vstudio\vc11\\..\..\Deploy\VisualStudio2012\Debug already exists.
1> The system cannot find the path specified.
1> 0 file(s) copied.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(134,5): error MSB3073: The command "if not exist "H:\Worspace\VS2013\Frameworks\SFS2X_API_Cpp_v1.1.0\ZLib\contrib\vstudio\vc11\\..\..\..\..\Deploy\VisualStudio2012\Debug" md "H:\Worspace\VS2013\Frameworks\SFS2X_API_Cpp_v1.1.0\ZLib\contrib\vstudio\vc11\\..\..\Deploy\VisualStudio2012\Debug"
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(134,5): error MSB3073: copy "H:\Worspace\VS2013\Frameworks\SFS2X_API_Cpp_v1.1.0\ZLib\contrib\vstudio\vc11\x86\ZlibDllDebug\zlibwapi.dll" "H:\Worspace\VS2013\Frameworks\SFS2X_API_Cpp_v1.1.0\ZLib\contrib\vstudio\vc11\\..\..\..\..\Deploy\VisualStudio2012\Debug"
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(134,5): error MSB3073: :VCEnd" exited with code 1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
------------------------------------------------------------------------------


Any help would be great, thanks.

Btw, it would be great if we can get 2013 solution folder as well. If I can get it running in 2013 myself, pls let me know the steps. Sorry if this sounds noob :(
MBagnati
Posts: 126
Joined: 12 Feb 2013, 10:57

Re: Not able to Compile in VS 2013

Postby MBagnati » 18 Feb 2014, 13:53

Hi,

Let's start from client API.
There is a mistake in post-build commands, when the build task generates its output.
As temporary workaround, to avoid this problem and build client API with success, please follow these steps:

  • Download client API from our website, you will get the SFS2X_API_Cpp_v1.1.0 file on your computer
  • Unzip the SFS2X_API_Cpp_v1.1.0 file, you will get the SFS2X_API_Cpp_v1.1.0 folder on your computer
  • Manually create these folders:

    SFS2X_API_Cpp_v1.1.0\Deploy\VisualStudio2012\Debug
    SFS2X_API_Cpp_v1.1.0\Deploy\VisualStudio2012\Release

    In other words starting from unzipped SFS2X_API_Cpp_v1.1.0 folder you must manually create the sub-folders: Deploy, VisualStudio2012, Debug and Release
  • Follow instruction described in http://docs2x.smartfoxserver.com/GettingStarted/client-api-cpp chapter Libraries compilation, section Windows - Visual Studio 2012

The build should be completed without errors.

Now, about samples.
Samples have references to API's header and binaries files.
Please, organize the projects in your file system in this way:

.......Main
......... | ... trunk_api
..........|........|
..........|........| ... Bitswarm
..........|........| ... Controllers
..........|........| ... Core
..........|........| ...
..........|
..........| ... Mytest
..................|
..................| ... SFS2X_Cpp_Examples
..............................|
..............................| ... SimpleChat (VS2012)


where:
  • trunk_api is the name of the folder where has been unzipped the file SFS2X_API_Cpp_v1.1.0 (API). You must rename the unzipped folder from SFS2X_API_Cpp_v1.1.0 to trunk_api
  • Mytest is a generic folder that contains the samples
  • SFS2X_Cpp_Examples is the unzipped folder for samples

First of all build the API.
Then open a sample solution, for instance SimpleChat.sln solution contained into SFS2X_Cpp_Examples\SimpleChat (VS2012) and build sample

Finally, about VisualStudio 2013
At the moment, the VisualStudio solution for client API is available for VisualStudio 2010 and VisualStudio 2012.
We are working to upgrade to VisualStudio 2013.
A new API version that will support this environment will be delivered soon.
ramSe7en
Posts: 5
Joined: 13 Feb 2014, 17:40

Re: Not able to Compile in VS 2013

Postby ramSe7en » 19 Feb 2014, 17:15

working now. thnx :)

Return to “SFS2X C++ API”

Who is online

Users browsing this forum: No registered users and 30 guests