Smartfox client inside static library

Post here your questions about the Objective-C API for SFS2X

Moderators: Lapo, Bax

mmdumi
Posts: 3
Joined: 14 Jan 2011, 18:33

Smartfox client inside static library

Postby mmdumi » 14 Jan 2011, 18:37

Hello guys,
I'm building a static library with smartfox inside it. For some reasons it will just not connect to my smartfox server (in the non static version it works great) but the error i get is :

+[NSStream getStreamsToHostNamed:port:inputStream:outputStream:]: unrecognized selector sent to class 0x1325a6c

And by following the debugging it says that is crashing at this line :
[NSStream getStreamsToHostNamed:ipAdr port:port inputStream:&_inStream outputStream:&_outStream];
inside INFSmartFoxiPhoneClient class.

Do you have any clue about this error ?
Thanks,
Mihai
mmdumi
Posts: 3
Joined: 14 Jan 2011, 18:33

Postby mmdumi » 15 Jan 2011, 12:12

Solve,
If u want to make smartfox to work in a static library just add
-ObjC
-all_load
linkage flags to "Other Linking flags" option
AB
Posts: 4
Joined: 19 Jan 2011, 19:08

Postby AB » 19 Jan 2011, 19:12

mmdumi wrote:Solve,
If u want to make smartfox to work in a static library just add
-ObjC
-all_load
linkage flags to "Other Linking flags" option


Just an extra info if, like me, using -all_load will lead to other issues like duplicated symbols, there's also the -force_load flag where you specify the library you want all symbols to be loaded (you must specify the path to the lib file.)

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 18 guests