Link error of sio2Init and sio2Shutdown with v1.4

Go down

Link error of sio2Init and sio2Shutdown with v1.4

Post  WonwooLee on Tue Jul 28, 2009 4:01 am

Hi.

I have used the SIO2 engine by making a static library 'libsio2.a' from the source code according to the pose here :

http://blog.lyxite.com/2009/01/better-way-of-using-sio2-iphone-sdk.html

and, there has been no problem.

However, after I updated the engine to v1.4, I got the following link error.
The libsio2.a is built with no errors, ( I didn't use the pre-built library (libsio2_sim/dev.a)
but my application shows the error.

(I'm using an iPhone 3G with firmware 2.2.1. )

Undefined symbols:
"_sio2Shutdown", referenced from:
templateShutdown() in template.o
"_sio2Init", referenced from:
-[EAGLView createFramebuffer] in EAGLView.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
"_sio2Shutdown", referenced from:
templateShutdown() in template.o
"_sio2Init", referenced from:
-[EAGLView createFramebuffer] in EAGLView.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

I think there is no implementation of both sio2Init and sio2Shutdown in the directory of SDK_DIR/src/sio2.
How could I solve the problem ?

WonwooLee

Posts : 5
Join date : 2009-06-03

View user profile

Back to top Go down

Re: Link error of sio2Init and sio2Shutdown with v1.4

Post  goldfrapp0x0309 on Tue Jul 28, 2009 4:14 am

Did u recreate and re-add files in the project (in xcode) or just drop in finder ? That might make a difference...
avatar
goldfrapp0x0309

Posts : 43
Join date : 2009-02-28

View user profile

Back to top Go down

Re: Link error of sio2Init and sio2Shutdown with v1.4

Post  WonwooLee on Tue Jul 28, 2009 5:15 am

namar777 wrote:Did u recreate and re-add files in the project (in xcode) or just drop in finder ? That might make a difference...

Hi, I added the src folder to the project for static library through Add->Existing files menu.
So the project tree is something like this...

project
|-src
|------ lua
|------ sio2
|------ ....

WonwooLee

Posts : 5
Join date : 2009-06-03

View user profile

Back to top Go down

Re: Link error of sio2Init and sio2Shutdown with v1.4

Post  goldfrapp0x0309 on Tue Jul 28, 2009 3:18 pm

Seems that the unlinked functions are from the sio2.cc file....
avatar
goldfrapp0x0309

Posts : 43
Join date : 2009-02-28

View user profile

Back to top Go down

Re: Link error of sio2Init and sio2Shutdown with v1.4

Post  sio2interactive on Tue Jul 28, 2009 3:20 pm

The functions are contained in libsio2_dev & libsio2_sim make sure that you link them with your static library...

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 39
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Link error of sio2Init and sio2Shutdown with v1.4

Post  WonwooLee on Tue Jul 28, 2009 4:49 pm

Hi.

Linking with libsio2_dev.a or libsio2_sim.a seems to solve my problem. Thank you for comments.

Are these two files static libraries of the whole sio2 (I mean the codes in src/sio2 directory) ?

(If so, I may not need to compile the codes in src/sio2 when I build my static library. Just linking with these two may work.)

Or, are they just containing the implementation of sio2Init() and sio2Shutdown() ?

WonwooLee

Posts : 5
Join date : 2009-06-03

View user profile

Back to top Go down

Re: Link error of sio2Init and sio2Shutdown with v1.4

Post  sio2interactive on Tue Jul 28, 2009 5:01 pm

Its only the initialization and the shutdown as well as the certificate recognition code... as you can see its only 80k so... pretty small...

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 39
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Link error of sio2Init and sio2Shutdown with v1.4

Post  WonwooLee on Tue Jul 28, 2009 5:46 pm

Thank you !!

WonwooLee

Posts : 5
Join date : 2009-06-03

View user profile

Back to top Go down

Re: Link error of sio2Init and sio2Shutdown with v1.4

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum