Page 1 of 1

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

Posted: 13 Dec 2014, 09:58
by prince_hao
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.

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

Posted: 16 Dec 2014, 04:16
by prince_hao
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.

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

Posted: 16 Dec 2014, 04:17
by prince_hao
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.

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

Posted: 16 Dec 2014, 04:17
by prince_hao
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.

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

Posted: 17 Dec 2014, 17:47
by MBagnati
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

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

Posted: 22 Dec 2014, 08:31
by prince_hao
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!

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

Posted: 23 Dec 2014, 02:19
by prince_hao
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!