Page 1 of 1

ptlib cross compile for ios

Posted: Tue Oct 09, 2018 9:17 am
by echoFromHeaven
How should I compile the latest version ptlib for iOS?
I do these steps and get a 'x86-64' architecture static library:
./configure --prefix=/Users/huhai/Desktop/tempout/20181009/ --disable-FEATURE --host=armv7-apple-darwin
make optnoshared
When I use 'lipo' to check the finally created library 'lib_Darwin_armv7/libpt_s.a', it shows that 'lib_Darwin_armv7/libpt_s.a is architecture: x86_64'
:cry: :cry:

Re: ptlib cross compile for ios

Posted: Tue Oct 09, 2018 12:14 pm
by willamowius
First, you shouldn't use the latest version of PTLib on any OS for H323Plus. Also, I'm not sure if anyone has compiled PTLib on iOS before.

The suggested PTLib version for H323Plus is the 2.10.9 fork that I maintain on Github: https://github.com/willamowius/ptlib

Unfortunately that branch has buggy IPv6 support on BSD variants, including MacOS X. On MacOS X you should use PTLib 2.11.0 as of 2012-02-20 (no, not the final 2.11.0, that has changes in the API and breaks with H323Plus). I know 2.11.0 compiles fine on MacOS X if you use gcc (haven't tried cross-compiling).

I would use either of those versions as a starting point for compiling for iOS.

Re: ptlib cross compile for ios

Posted: Wed Oct 10, 2018 1:31 am
by echoFromHeaven
Thanks, willamowius! I will try that version for iOS. :)

Re: ptlib cross compile for ios

Posted: Thu Oct 11, 2018 1:36 am
by echoFromHeaven
Unfortunately, I got the same result...The final static library is also 'x86_64'.
If I set CFLAGS to specify '-arch armv7 -isysroot ${IPHONE_SDK}' and comment a lot of codes, I got the 'armv7' library.But it lost many functionalities(including audio devices operating) I need...Does PTLib support iOS?Or I need implement those fucntionalities by myself?
Thanks in advance!

Re: ptlib cross compile for ios

Posted: Sat Oct 13, 2018 7:28 pm
by willamowius
You need to add the iOS support.