compile 1.1.6 API in eclipse on Ubuntu(14.04 LTS/ 64bit)

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

Moderators: Lapo, Bax, MBagnati

prince_hao
Posts: 71
Joined: 30 Oct 2010, 04:35

compile 1.1.6 API in eclipse on Ubuntu(14.04 LTS/ 64bit)

Postby prince_hao » 13 Dec 2014, 09:58

Hi,

Thanks for the help in advance.

I have repeated, on my Ubuntu machine (14.04 LTS/ 64bit) with Eclipse, all steps described in chapter Linux/Unix — Eclipse Cygwin of http://docs2x.smartfoxserver.com/GettingStarted/client-api-cpp that are required to build the library .


I have read this page [url]http://smartfoxserver.com/forums/viewtopic.php?f=34&t=16983&p=73445&hilit=Linux%2FUnix+—+Eclipse+Cygwin#p73445[/url], but I still haven't found the solution.

Any help is appreciated. Thanks.
Attachments
step01.png
(66.4 KiB) Not downloaded yet
step02.png
(79.47 KiB) Not downloaded yet
step03.png
(68.12 KiB) Not downloaded yet
prince_hao
Posts: 71
Joined: 30 Oct 2010, 04:35

Re: compile 1.1.6 API in eclipse on Ubuntu(14.04 LTS/ 64bit)

Postby prince_hao » 16 Dec 2014, 04:16

prince_hao wrote:Hi,

Thanks for the help in advance.

I have repeated, on my Ubuntu machine (14.04 LTS/ 64bit) with Eclipse, all steps described in chapter Linux/Unix — Eclipse Cygwin of http://docs2x.smartfoxserver.com/GettingStarted/client-api-cpp that are required to build the library .


I have read this page [url]http://smartfoxserver.com/forums/viewtopic.php?f=34&t=16983&p=73445&hilit=Linux%2FUnix+—+Eclipse+Cygwin#p73445[/url], but I still haven't found the solution.

Any help is appreciated. Thanks.
Attachments
step04.png
(54.44 KiB) Not downloaded yet
step05.png
(22.42 KiB) Not downloaded yet
step06.png
(97.85 KiB) Not downloaded yet
prince_hao
Posts: 71
Joined: 30 Oct 2010, 04:35

Re: compile 1.1.6 API in eclipse on Ubuntu(14.04 LTS/ 64bit)

Postby prince_hao » 16 Dec 2014, 04:17

prince_hao wrote:Hi,

Thanks for the help in advance.

I have repeated, on my Ubuntu machine (14.04 LTS/ 64bit) with Eclipse, all steps described in chapter Linux/Unix — Eclipse Cygwin of http://docs2x.smartfoxserver.com/GettingStarted/client-api-cpp that are required to build the library .


I have read this page [url]http://smartfoxserver.com/forums/viewtopic.php?f=34&t=16983&p=73445&hilit=Linux%2FUnix+—+Eclipse+Cygwin#p73445[/url], but I still haven't found the solution.

Any help is appreciated. Thanks.
Attachments
step07.png
(91.34 KiB) Not downloaded yet
step08.png
(94.83 KiB) Not downloaded yet
step09.png
(23 KiB) Not downloaded yet
prince_hao
Posts: 71
Joined: 30 Oct 2010, 04:35

Re: compile 1.1.6 API in eclipse on Ubuntu(14.04 LTS/ 64bit)

Postby prince_hao » 16 Dec 2014, 04:17

prince_hao wrote:Hi,

Thanks for the help in advance.

I have repeated, on my Ubuntu machine (14.04 LTS/ 64bit) with Eclipse, all steps described in chapter Linux/Unix — Eclipse Cygwin of http://docs2x.smartfoxserver.com/GettingStarted/client-api-cpp that are required to build the library .


I have read this page [url]http://smartfoxserver.com/forums/viewtopic.php?f=34&t=16983&p=73445&hilit=Linux%2FUnix+—+Eclipse+Cygwin#p73445[/url], but I still haven't found the solution.

Any help is appreciated. Thanks.
Attachments
step10.png
(191.98 KiB) Not downloaded yet
MBagnati
Posts: 126
Joined: 12 Feb 2013, 10:57

Re: compile 1.1.6 API in eclipse on Ubuntu(14.04 LTS/ 64bit)

Postby MBagnati » 17 Dec 2014, 17:47

Hi,

Please open API file SmartFox.cpp and move to line 1618.
Here replace

Code: Select all

      boost::shared_ptr<vector<string>> changedVarNames = ((boost::static_pointer_cast<vector <string> >))((*(e->Params()))["changedVars"]);

with

Code: Select all

      boost::shared_ptr<vector<string> > changedVarNames = ((boost::static_pointer_cast<vector <string> >))((*(e->Params()))["changedVars"]);

adding a blank between >> chars.

Then move to line 1623
Here replace

Code: Select all

      boost::shared_ptr<vector<string>> changedVarNames = ((boost::static_pointer_cast<vector <string> >))((*(e->Params()))["changedVars"]);

with

Code: Select all

      boost::shared_ptr<vector<string> > changedVarNames = ((boost::static_pointer_cast<vector <string> >))((*(e->Params()))["changedVars"]);

adding a blank between >> chars.

These changes will fix the error ">> should be > >" showed in your screenshot.
Please check if other errors are also fixed
prince_hao
Posts: 71
Joined: 30 Oct 2010, 04:35

Re: compile 1.1.6 API in eclipse on Ubuntu(14.04 LTS/ 64bit)

Postby prince_hao » 22 Dec 2014, 08:31

MBagnati wrote:Hi,

Please open API file SmartFox.cpp and move to line 1618.
Here replace

Code: Select all

      boost::shared_ptr<vector<string>> changedVarNames = ((boost::static_pointer_cast<vector <string> >))((*(e->Params()))["changedVars"]);

with

Code: Select all

      boost::shared_ptr<vector<string> > changedVarNames = ((boost::static_pointer_cast<vector <string> >))((*(e->Params()))["changedVars"]);

adding a blank between >> chars.

Then move to line 1623
Here replace

Code: Select all

      boost::shared_ptr<vector<string>> changedVarNames = ((boost::static_pointer_cast<vector <string> >))((*(e->Params()))["changedVars"]);

with

Code: Select all

      boost::shared_ptr<vector<string> > changedVarNames = ((boost::static_pointer_cast<vector <string> >))((*(e->Params()))["changedVars"]);

adding a blank between >> chars.

These changes will fix the error ">> should be > >" showed in your screenshot.
Please check if other errors are also fixed


Thanks for your reply!
I have successfully compiled the API! :D But you need to use vs first compile the download program to generate the Deploy folder to compile!
Now I have some new problems, when I compile libSmartFoxClientApi.so into the android got some mistakes : Unable to recognise the format of the input file `./libs/armeabi/libSmartFoxClientApi.so'.
could you give me some advice? thanks very much!
prince_hao
Posts: 71
Joined: 30 Oct 2010, 04:35

Re: compile 1.1.6 API in eclipse on Ubuntu(14.04 LTS/ 64bit)

Postby prince_hao » 23 Dec 2014, 02:19

prince_hao wrote:
MBagnati wrote:Hi,

Please open API file SmartFox.cpp and move to line 1618.
Here replace

Code: Select all

      boost::shared_ptr<vector<string>> changedVarNames = ((boost::static_pointer_cast<vector <string> >))((*(e->Params()))["changedVars"]);

with

Code: Select all

      boost::shared_ptr<vector<string> > changedVarNames = ((boost::static_pointer_cast<vector <string> >))((*(e->Params()))["changedVars"]);

adding a blank between >> chars.

Then move to line 1623
Here replace

Code: Select all

      boost::shared_ptr<vector<string>> changedVarNames = ((boost::static_pointer_cast<vector <string> >))((*(e->Params()))["changedVars"]);

with

Code: Select all

      boost::shared_ptr<vector<string> > changedVarNames = ((boost::static_pointer_cast<vector <string> >))((*(e->Params()))["changedVars"]);

adding a blank between >> chars.

These changes will fix the error ">> should be > >" showed in your screenshot.
Please check if other errors are also fixed


Thanks for your reply!
I have successfully compiled the API! :D But you need to use vs first compile the download program to generate the Deploy folder to compile!
Now I have some new problems, when I compile libSmartFoxClientApi.so into the android got some mistakes : Unable to recognise the format of the input file `./libs/armeabi/libSmartFoxClientApi.so'.
could you give me some advice? thanks very much!

i have find the way compile the api into the android,thanks!

Return to “SFS2X C++ API”

Who is online

Users browsing this forum: No registered users and 13 guests