objective c - How can I build this static C library to work with iPhone -
i have been trying c library built iphone project. library provided me makefile. when build library running make , adding static lib project linker complains library build x86_64 architecture , cannnot linked i386.
so.. edited make file build library i386. project compiles , links without problem application terminates due to:
detected attempt call symbol in system libraries not present on iphone: fcntl$unix2003 called function irc_connect in image kadechat. if encountering problem running simulator binary within gdb, make sure 'set start-with-shell off' first.
i did lot of googling , seems might bug version of sdk (but im not sure).
so.. want run application on device since, apparently, simulator not work. problem cannot library build target architecture.
file built unsupported file format not architecture being linked (armv7)
i edited make file again try , build library device's target architecture.
i made following edits in makefile:
cc = /developer/platforms/iphoneos.platform/developer/usr/bin/clang cflags = -wall -din_building_libirc -o3 -denable_threads -d_reentrant -arch armv7
this results in following error:
/usr/include/machine/_types.h:36:10: fatal error: 'arm/_types.h' file not found #include "arm/_types.h"
as can see not having luck getting library work me. since new iphone development thought ask. best way deal porting c library work iphone? should try , build source directly in project?? have attempted resulted in many errors. advice helpful.
thanks!
rather hacking around trying settings right cross-compile things manually using makefile, perhaps simplest thing include source of library directly project say.
if resulted in "many errors", perhaps you're missing .h files, or makefile setting "-d" compiler flags you're not providing in xcode.
Comments
Post a Comment