开发者

Creating a static c lib for ios

开发者 https://www.devze.com 2023-04-13 01:25 出处:网络
I\'m want to compile a c library for the iphone. I\'m totally unexperienced with that and googled around and found this her: Compile C lib for iPhone

I'm want to compile a c library for the iphone. I'm totally unexperienced with that and googled around and found this her: Compile C lib for iPhone

The original source code of the project I want to build compiles fine on my mac and the r开发者_Python百科esult contains the following directory structure

bin     include lib     share

So after that I now want to build this stuff so that I can use it on my iphone. For the first step I just copy and pasted the configure command from the link above and hit enter. This is the result:

./configure --build=arm-apple-darwin --enable-static=yes --enable-shared=no         CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1 CFLAGS="-pipe -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=3.1.2 -gdwarf-2 -mthumb -I/Library/iPhone/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk -mdynamic-no-pic" CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar AS=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/as LIBTOOL=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool STRIP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip RANLIB=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib
checking build system type... arm-apple-darwin
checking host system type... arm-apple-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking host system type... posix
checking for gcc... /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1
checking whether the C compiler works... no
configure: error: in `/path/to/gwenhywfar-4.3.0-src':
configure: error: C compiler cannot create executables

But what is the problem with that? How can this be repaired? Am I right if I assume that preventing creating binary executables would be the solution?

0

精彩评论

暂无评论...
验证码 换一张
取 消