ptlib cross compile for ios

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

ptlib cross compile for ios

Post by echoFromHeaven » Tue Oct 09, 2018 9:17 am

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: 37
Joined: Tue Sep 01, 2009 7:25 am
Contact:

Re: ptlib cross compile for ios

Post by willamowius » Tue Oct 09, 2018 12:14 pm

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
http://www.gnugk.org
http://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 » Wed Oct 10, 2018 1:31 am

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 » Thu Oct 11, 2018 1:36 am

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: 37
Joined: Tue Sep 01, 2009 7:25 am
Contact:

Re: ptlib cross compile for ios

Post by willamowius » Sat Oct 13, 2018 7:28 pm

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

Post Reply

Return to “H.323 Plus”