Overview
Features
Download
Documentation
Community
Add-Ons & Services

POCO on the iPhone

Tips and tricks for POCO C++ Libraries users.

Re: POCO on the iPhone

Postby mvl » 09 Nov 2012, 05:03

When building for iOS with Xcode 4.3 and up, another change is needed to the build configuration file located at <poco>/build/config/iPhone. Since Xcode and the platform SDKs for iOS are now self-contained in the Xcode.app's bundle, rather than being in a /Developer directory, I changed the line in the config file from this:

Code: Select all
TOOL_PREFIX  ?= /Developer/Platforms/$(IPHONE_SDK).platform/Developer/usr/bin 


to this:

Code: Select all
TOOL_PREFIX ?= $(shell xcode-select --print-path)/Platforms/$(IPHONE_SDK).platform/Developer/usr/bin


This worked for me using Xcode 4.5.2. Not that I mind configure/make, but it would be nice to have an Xcode project which had targets for the various Apple platforms, and did the 'lipo' script to zip the architectures together for iPhone and iPhoneSimulator. :geek:

Thanks!

Michael VanLandingham
Software AI, AlienOverlord
mvl
 
Posts: 1
Joined: 09 Nov 2012, 04:39

Re: POCO on the iPhone

Postby davidraleigh » 12 Jan 2013, 15:48

I'm trying to compile POCO on the iPhone and I'm getting an error to do with FPEnvironment.h. For some reason I'm getting an error that copysignf and copysign are not a part of std librar. If I compile for Darwin I don't have any trouble. Below is the terminal window stuff.




David-Raleighs-MacBook-Air:poco davidraleigh$ ./configure --config=iPhoneSimulator --no-tests --no-samples --omit=CppParser,CodeGeneration,Remoting/RemoteGen,Crypto,NetSSL_OpenSSL,Data/ODBC,Data/MySQL
Configured for iPhoneSimulator
David-Raleighs-MacBook-Air:poco davidraleigh$ make -s -j4
** Compiling src/ArchiveStrategy.cpp (debug, static)
** Compiling src/Base64Decoder.cpp (debug, static)
** Compiling src/Base64Encoder.cpp (debug, static)
** Compiling src/BinaryReader.cpp (debug, static)
In file included from include/Poco/FPEnvironment.h:47,
from include/Poco/NumericString.h:45,
from include/Poco/NumberFormatter.h:44,
from include/Poco/ArchiveStrategy.h:47,
from src/ArchiveStrategy.cpp:37:
include/Poco/FPEnvironment_DUMMY.h: In static member function ‘static float Poco::FPEnvironmentImpl::copySignImpl(float, float)’:
include/Poco/FPEnvironment_DUMMY.h:134: error: ‘copysignf’ is not a member of ‘std’
include/Poco/FPEnvironment_DUMMY.h: In static member function ‘static double Poco::FPEnvironmentImpl::copySignImpl(double, double)’:
include/Poco/FPEnvironment_DUMMY.h:140: error: ‘copysign’ is not a member of ‘std’
** Compiling src/BinaryWriter.cpp (debug, static)
make[1]: *** [/Users/davidraleigh/Documents/CODE/MobileProjects/ThirdPartyLibraries/poco/Foundation/obj/iPhoneSimulator/i686/debug_static/ArchiveStrategy.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Foundation-libexec] Error 2
David-Raleighs-MacBook-Air:poco davidraleigh$
davidraleigh
 
Posts: 1
Joined: 12 Jan 2013, 15:41

Re: POCO on the iPhone

Postby guenter » 14 Jan 2013, 08:41

Please re-download the 1.4.6 sources. This has been fixed in a "last minute" change. Or get the corrected FPEnvironment_DUMMY.h file from GitHub: https://raw.github.com/pocoproject/poco ... nt_DUMMY.h
guenter
 
Posts: 1155
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: POCO on the iPhone

Postby steve » 17 Jan 2013, 21:39

In trying to cross compile the library from Linux to Windows (with i586-mingw32msvc-...) and checking for the latest version of
FPEnvironment_DUMMY.h
something similar happens:

...
** Compiling src/Exception.cpp (debug, static)
** Compiling src/FPEnvironment.cpp (debug, static)
In file included from src/FPEnvironment_DUMMY.cpp:37,
from src/FPEnvironment.cpp:42:
include/Poco/FPEnvironment_DUMMY.h: In static member function ‘static float Poco::FPEnvironmentImpl::copySignImpl(float, float)’:
include/Poco/FPEnvironment_DUMMY.h:137: error: ‘copysignf’ is not a member of ‘std’
include/Poco/FPEnvironment_DUMMY.h: In static member function ‘static double Poco::FPEnvironmentImpl::copySignImpl(double, double)’:
include/Poco/FPEnvironment_DUMMY.h:147: error: ‘copysign’ is not a member of ‘std’
make[1]: *** [/home/steve/Public/printfleet/proxy/thirdParty/poco-1.4.6-all/Foundation/obj/MinGW/ia32/debug_static/FPEnvironment.o] Error 1
make: *** [Foundation-libexec] Error 2
steve
 
Posts: 3
Joined: 17 Jan 2013, 21:31

Re: POCO on the iPhone

Postby alex » 20 Jan 2013, 04:09

just remove the std:: in front of the offending lines and it'll be ok. That was requested by Android users and it created a mess because copysign are C99 but not really C++ standard yet (just TR1). Will be properly taken care of in future releases.
alex
 
Posts: 1145
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: POCO on the iPhone

Postby marlowabnp » 22 Jan 2013, 14:28

davidraleigh wrote:I'm trying to compile POCO on the iPhone and I'm getting an error to do with FPEnvironment.h. For some reason I'm getting an error that copysignf and copysign are not a part of std librar.
I am also getting this error on Windows 7 when using cygwin, GCC version 4.5.3. I am trying to build poco-1.5.1. I note that the code in 1.5.1 does not include the fix for apple and android but even if it did, more is needed for cygwin.
marlowabnp
 
Posts: 89
Joined: 08 Nov 2010, 17:29

Re: POCO on the iPhone

Postby tng2903 » 25 Jan 2013, 13:02

Hi,

I've managed to build POCO 1.4.6 on iPhone and trying to implemented it into my project. But I got a lot of error in cstring like

no member named "xxxxx" in global namespace

I'm using xcode 4.5.2 with MAC OS X 10.8.2.
Thank you in advance :D
tng2903
 
Posts: 1
Joined: 25 Jan 2013, 12:57

Re: POCO on the iPhone

Postby frankmail007 » 14 Feb 2013, 08:31

I got a lot of error messages like:

"ls: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-*: No such file or directory"

Any idea? Thanks
frankmail007
 
Posts: 9
Joined: 16 Mar 2009, 18:22

Re: POCO on the iPhone

Postby slimshader » 27 Feb 2013, 12:55

frankmail007 wrote:I got a lot of error messages like:

"ls: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-*: No such file or directory"

Any idea? Thanks


Same error here.
slimshader
 
Posts: 4
Joined: 10 Jan 2013, 13:40

Re: POCO on the iPhone

Postby icecream » 06 Jul 2013, 00:20

i believe gcc has been removed in recent versions of xcode, and you should use clang instead. this seemed to work for me:
Code: Select all
./configure --config=iPhone-clang-libc++ --no-samples --no-tests --omit=CppParser,CodeGeneration,Remoting/RemoteGen,Crypto,NetSSL_OpenSSL,Data/ODBC,Data/MySQL


well, it compiled without error, but that's as far as i've got so far. also note that i omitted the above components because it was recommended in a previous tips&tricks. may not be necessary.
icecream
 
Posts: 3
Joined: 06 Jul 2013, 00:17

PreviousNext

Return to Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest