Build SmartfoxClient API C++ on Mac

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

Moderators: Lapo, Bax, MBagnati

caldelta
Posts: 7
Joined: 11 Aug 2015, 04:13
Location: Viet Nam
Contact:

Build SmartfoxClient API C++ on Mac

Postby caldelta » 11 Aug 2015, 18:23

Hello I just build the latest C++ API 1.6.0 to integrate it to cocos2d-x version 3.7

Everything seem ok unless the error linker below:

Using Eclipse and Cross G++ compiler and follow the tutorial here

http://docs2x.smartfoxserver.com/Gettin ... nt-api-cpp

. Do I missing something ? Please help ...

Code: Select all

Building target: libSFS.dylib
Undefined symbols for architecture x86_64:
  "_compress", referenced from:
      Sfs2X::Util::ByteArray::Compress() in ByteArray.o
     (maybe you meant: __ZNK5boost4asio3ssl6detail17openssl_init_base7do_init28get_null_compression_methodsEv, __ZN5boost4asio3ssl6detail17openssl_init_base28get_null_compression_methodsEv )
  "_uncompress", referenced from:
      Sfs2X::Util::ByteArray::Uncompress() in ByteArray.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libSFS.dylib] Error 1
caldelta
Posts: 7
Joined: 11 Aug 2015, 04:13
Location: Viet Nam
Contact:

Re: Build SmartfoxClient API C++ on Mac

Postby caldelta » 11 Aug 2015, 19:54

Fine, I need to add zLib library to project for it go successful.

But when i compile my source, it said

Code: Select all

libSmartFoxClientAPI.dylib, file was built for x86_64 which is not the architecture being linked (arm64): libSmartFoxClientAPI.dylib


How do I build the library link to arm64?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Build SmartfoxClient API C++ on Mac

Postby Lapo » 12 Aug 2015, 15:26

Hi,
the API should be compiled for the architecture you are targeting.
If you're working on a project for iOS or Android (which use the ARM processor) then you will have to compile the API for that platform.

Can you clarify what you're trying to do?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X C++ API”

Who is online

Users browsing this forum: No registered users and 19 guests