ptlib cross compile for ios

Discussion related to implementation and use of the H.323 Plus H.323 stack at https://www.h323plus.org.
Post Reply
echoFromHeaven
Posts: 3
Joined: Tue Oct 09, 2018 9:01 am

ptlib cross compile for ios

Post 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:
User avatar
willamowius
Posts: 50
Joined: Tue Sep 01, 2009 7:25 am
Contact:

Re: ptlib cross compile for ios

Post 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.
Jan Willamowius
Founder of the GNU Gatekeeper Project
https://www.gnugk.org
https://www.willamowius.com (H.323 support)
echoFromHeaven
Posts: 3
Joined: Tue Oct 09, 2018 9:01 am

Re: ptlib cross compile for ios

Post by echoFromHeaven »

Thanks, willamowius! I will try that version for iOS. :)
echoFromHeaven
Posts: 3
Joined: Tue Oct 09, 2018 9:01 am

Re: ptlib cross compile for ios

Post 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!
User avatar
willamowius
Posts: 50
Joined: Tue Sep 01, 2009 7:25 am
Contact:

Re: ptlib cross compile for ios

Post by willamowius »

You need to add the iOS support.
Jan Willamowius
Founder of the GNU Gatekeeper Project
https://www.gnugk.org
https://www.willamowius.com (H.323 support)
Post Reply