Hello,
Hope someone can help me,
I am trying to build openldap for an app on my iPhoneOS3 but when I try to use something from the library I get this error :
Program received signal: “EXC_ BAD_ACCESS”.
I followed this website to compile openldap with iphone gcc. So I built openldap with this :
export DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
export SDKROOT=$DEVROOT/SDKs/iPhoneOS3.0.sdk
export CPPFLAGS="-I$SDKROOT/usr/lib/gcc/arm-apple-darwin9/4.2.1/include/
-I$SDKROOT/usr/include/ -I/usr/local/BerkeleyDB.4.7/include/"
export CFLAGS="$CPPFLAGS -pipe -no-cpp-precomp -isysroot $SDKROOT"
export CPP="/usr/bin/cpp $CPPFLAGS"
export LDFLAGS="-L$SDKROOT/usr/lib/ -L/usr/local/BerkeleyDB.4.7/lib/"
./configure CC=$DEVROOT/usr/bin/arm-apple-darwin9-gcc-4.2.1 \
LD=$DEVROOT/usr/bin/ld --host=arm-apple-darwin --with-yielding_select=yes
make depend
make
I copied libldap.a, liblber.a to my project and all headers as ldap.h ....
In project settings I have :
Header Search Path : /path/to/openldap/headers
Library Search Path : filled with path from libldap.a and liblber.a
Other Linker Flags : -lldap -llber -ObjC
Everything is fine when it builds but I get the error above with the following code :
LDAP **ld;
ldap_initialize(ld, "ldap://myldap.exemple.com");
Does someone have any idea what I can do ?
Thank you