I’m currently working on my first iPhone app

Need to use libcurl..

I searched the Internet and found a libcurl library without SSL.

Then there is no ready-made one.. About with SSL, they are just some tutorials..

But since I built the toolchain under Linux, I encountered many problems during the compilation process.

After a tortuous compilation process. Here are my parameters for compiling libcurl. You can refer to it.

1
2
3
./configure --prefix=/root/work/curl/ --host=arm-apple-darwin9 --disable-shared --enable-static --with-random=/dev/urandom CC=/root/iphone/ toolchain/toolchain/pre/bin/arm-apple-darwin9-gcc CFLAGS="-lobjc -march=armv6 -mcpu=arm1176jzf-s -isysroot /root/iphone/toolchain/sdks/iPhoneOS3.1.2.sdk -I/root /work/openssl/include -L/root/work/openssl" --with-ssl=/root/work/openssl CPP=/root/iphone/toolchain/toolchain/pre/bin/arm-apple-darwin9-cpp AR =/root/iphone/toolchain/toolchain/pre/bin/arm-apple-darwin9-ar LD=/root/iphone/toolchain/toolchain/pre/bin/arm-apple-darwin9-ld AS=/root/iphone/ toolchain/toolchain/pre/bin/arm-apple-darwin9-as
make
make install

Of course, for those “lazy guys”, I uploaded the libcurl library that I had compiled.

Instructions:

When compiling, please add the following parameters to your LDFLAGS, similar to this

1
2
3
LDFLAGS += -I./include
LDFLAGS += -L./lib
LDFLAGS += -lssl -lcrypto -lcurl -lz