iPhone SDK 3 EXC_BAD_ACCESS with openldap library - iphone

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

I think I made a mistake in my post, you should try to change
this line :
export LDFLAGS="-L$SDKROOT/usr/lib/ -L/usr/local/BerkeleyDB.4.7/include/"
by this one :
export LDFLAGS="-L$SDKROOT/usr/lib/ -L/usr/local/BerkeleyDB.4.7/lib/"
Sorry for my Mistake
Léon

Yes, I made it work so I will try to help you.
Here the commands line that I used to set all flasgs.
export DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
export SDKROOT=$DEVROOT/SDKs/iPhoneOS2.2.sdk
export CPPFLAGS="-I$SDKROOT/usr/lib/gcc/arm-apple-darwin9/4.0.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/"
So I needed to build BerkeleyDB, my version is 4.7.25.
./configure CC=$DEVROOT/usr/bin/arm-apple-darwin9-gcc-4.0.1 LD=$DEVROOT/usr/bin/ld --host=arm-apple-darwin
make
make install
And finally I built openldap like this :
./configure CC=$DEVROOT/usr/bin/arm-apple-darwin9-gcc-4.0.1 LD=$DEVROOT/usr/bin/ld --host=arm-apple-darwin --with-yielding_select=yes --enable-dynamic=yes --enable-modules=no --enable-static=yes --disable-shared --enable-ldap=yes && make depend && make
May be you did the same, if not try those commands. I know I used gcc 4.0.1 instead of 4.2.1 the one of iPhone OS 3 but I was wedged cause when I was trying to build only a static library it wasn't working properly when I was building my project. (a lot of errors)
After I built openldap, I made a new project
add in Header Search Path with the openldap include in Project Settings.
I copied both library into the ressource folder of my project : libldap.a and liblber.a
I filled Other Linker Flags with "-ObjC -lldap -llber"
Hope that can help you.

Related

How do I develop bare-metal i.mx6sx code using eclipse?

I was wondering if you could help me with some issues and questions I have for developing for the i.MX6 SoloX in bare-metal. I was looking at this link https://community.nxp.com/docs/DOC-106253 and downloaded the files there to use as an example of how to develop bare-metal c code for the i.MX6.
Then I setup my eclipse environment according to this tutorial https://community.nxp.com/docs/DOC-103736 but just the toolchain because I'm not interested in processor expert.
Since I'm working on Linux I didn't installed the Code Sourcery thing, instead I'm working with the gcc-arm-none-eabi which I installed using:
$ sudo apt-get install gcc-arm-none-eabi
And therefore I had to change the cs-rm and cs-make for rm and make respectively.
And I was able to create an eclipse project with the downloaded code and configure the project to make it work, nevertheless, I had the first error:
main.c:8:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
make: *** [cortex_A9/main.o] Error 1
cortex_A9/subdir.mk:24: recipe for target 'cortex_A9/main.o' failed
And I was able to solve it adding "/usr/include" in the include directories at project > properties. But I'm not sure if this is a correct way of solving this error.
After fixing this error I got a new one:
syscalls.c:168:1: error: unknown type name 'caddr_t'
caddr_t _sbrk(int incr)
And for solving that I had to include explicitly the file "/usr/include/x86_64-linux-gnu/sys/types.h" and also I don't know if that is the correct way to solve it.
Now having eliminated those two errors I have the following one:
Building target: imx6-A9.elf
Invoking: Cross ARM C Linker
arm-none-eabi-gcc -mcpu=cortex-a9 -march=armv7-a -marm -mlittle-endian -mfloat-abi=softfp -mfpu=neon -mno-unaligned-access -fno-zero-initialized-in-bss -O0 -g -T "/home/mmalagon/iMX6/MX6SX_hello_MFG/cortex_A9/mx6slx.ld" -nostartfiles -Wl,-Map,"imx6-A9.map" -o "imx6-A9.elf" ./cortex_A9/main.o ./cortex_A9/syscalls.o ./cortex_A9/uart.o
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: cannot find -lg
makefile:42: recipe for target 'imx6-A9.elf' failed
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make: *** [imx6-A9.elf] Error 1
Which I haven't been able to resolve.
I don't know if this error is a consequence of the way I solved the two previous errors.
Does anybody know how to properly setup eclipse for i.MX6 bare-metal development?
Thank you very much for helping!!
If you want to develop bare-metal code for the i.MX6SoloX without using CodeSourcery then you need to execute this:
sudo apt-get install gcc-arm-none-eabi libnewlib-arm-none-eabi -y
And then choose "Custom (arm-none-eabi-gcc)" at Project>Settings>C/C++ Build in the 'Toolchains' tab.

Xcode 4 - clang error

I'm migrating from Xcode 3.5 to Xcode 4 and
while I'm trying to Archiving my app for AdHoc distribution.
I received this error
Precompile MyApp_Prefix.pch
ProcessPCH /Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/Build/PrecompiledHeaders/MyApp_Prefix-crxrbmeralwexyefvuwvzexquuin/MyApp_Prefix.pch.pth MyApp_Prefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/return/Projects/iphone-MyApp
setenv LANG en_US.US-ASCII
setenv PATH "/Xcode4.2/Platforms/iPhoneOS.platform/Developer/usr/bin:/Xcode4.2/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Xcode4.2/Platforms/iPhoneOS.platform/Developer/usr/bin/clang -x objective-c-header -arch armv7 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -DFAVOURITES_ENABLED=0 -isysroot /Xcode4.2/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -gdwarf-2 -fvisibility=hidden -Wno-sign-conversion -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=3.0 -iquote "/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/MyApp-generated-files.hmap" "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/MyApp-own-target-headers.hmap" "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/MyApp-all-target-headers.hmap" -iquote "/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/MyApp-project-headers.hmap" "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/BuildProductsPath/Distribution-iphoneos/include" "-I”/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp" -I- "-IDistribution/BuildProductsPath/Distribution-iphoneos/../three20″" "-I“/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp" -I- "-IDistribution/BuildProductsPath/Distribution-iphoneos/../../three20″" -Ithree20/Build/Products/three20 -I/Xcode4.2/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/include/libxml2 "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/DerivedSources/armv7" "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/DerivedSources" "-F/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/BuildProductsPath/Distribution-iphoneos" -c /Users/return/Projects/iphone-MyApp/MyApp_Prefix.pch -o /Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/Build/PrecompiledHeaders/MyApp_Prefix-crxrbmeralwexyefvuwvzexquuin/MyApp_Prefix.pch.pth -MMD -MT dependencies -MF /Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/Build/PrecompiledHeaders/MyApp_Prefix-crxrbmeralwexyefvuwvzexquuin/MyApp_Prefix.pch.d
**clang: error: '-I-' not supported, please use -iquote instead**
**Command /Xcode4.2/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1**
Do you know what I should do to fix this?
UPDATE (report result after followed MacMade's suggestions)
So in the Target Build Settings:
I have nothing in Other C flags.
I have nothing in User Header Search Paths
In Header Search Paths, I have:
”$(BUILT_PRODUCTS_DIR)/../three20″
“$(BUILT_PRODUCTS_DIR)/../../three20″
./three20/Build/Products/three20
/usr/include/libxml2
but I'm not sure what to change here.
In Compiler for C/C++/Objective-C setting,
I switched from Apple LLVM compiler to LLVM GCC and get this message:
cc1obj: note: obsolete option -I- used, please use -iquote instead
cc1obj: error: -I- specified twice
cc1obj: note: obsolete option -I- used, please use -iquote instead
UPDATE (report result after followed MacMade's updated suggestions)
So I move:
”$(BUILT_PRODUCTS_DIR)/../three20″
“$(BUILT_PRODUCTS_DIR)/../../three20″
to User Header Search Paths
and it works!!!
(NOTE: I don't move ./three20/Build/Products/three20 because I see
can't find <Three20/Three20.h>
errors while building the project if I do.)
Apparently, you've set custom compiler flags for the include paths.
Go to your target's build settings and check this option:
Other C flags
If you have something in it, you may replace it by the -iquote version.
Otherwise, still in the build settings, check the value of the following options:
Header Search Paths
User Header Search Paths
Try to manipulate these values, if applicable.
Otherwise, you may also continue to use GCC as a fronted, instead of Clang.
You can do this by setting the Compiler for C/C++/Objective-C build setting to LLVM GCC instead of Apple LLVM compiler.
EDIT
Based on your edit, I can see you are using the Three20 library.
Depending on how you include that stuff, you may want to put these search paths to the User Header Search Paths, instead of Header search paths (if you include them with "" instead of <>).
Try to do this for Three20, but leave libxml here...
I tried these solutions. But i couldn't or not working for me.
I solved this problem with this way:
I deleted MuseumTests in targets
When you clicked your project in general tab on left there is targets
You can solve this problem by selecting General tab of AppNameTests and select your app from the drop down list and enable "Allow testing Host Applications APIs"
I just had this problem with an instagram lib, my mistake was that i was importing the files to a target and compiled the other target. It gave me some headaches.
Hi guys we did something that worked...
We had the same problem and it was quite easy to solve...
First you go to terminal type cd
cd (drag the whole folder where your file is in) and press return
after you are inside the folder you have to write:
pod instal and type return
something like that....
Last login: Wed Aug 21 09:19:29 on console
WozMac1:~ KrisBasque$
WozMac1:~ KrisBasque$
WozMac1:~ KrisBasque$
WozMac1:~ KrisBasque$ cd
WozMac1:~ KrisBasque$ cd /Users/KrisBasque/Documents/QUADDRO/medapp
WozMac1:medapp KrisBasque$ pod install
Analyzing dependencies
CocoaPods 0.23.0 is available.
Downloading dependencies
Using AFNetworking (1.3.1)
Installing FMDB (2.1)
Using MBProgressHUD (0.7)
Using PSStackedView (1.0)
Using Reachability (3.1.1)
Installing SDWebImage (3.3)
Using TapkuLibrary (0.2.4)
Installing libwebp (0.3.0-rc7)
Generating Pods project
Integrating client project
WozMac1:medapp KrisBasque$
The way I solved this was my making sure no other implementation files we're linked to your file. Linking interface files is fine though
This error also caused by wrong header import.
For example your class is "yourclass.h", but in wrong way if you import "yourclass.m" it is cause this error.

GCC 4.2.1 Compiling on Cygwin(Win7 64bit) for iPhone

This is going to take a long while to explain, but the short version is that I am currently attempting to compile the LLVM GCC frontend for ARMv7 to compile apps for the Cortex-A8(iPhone 3GS). I'm running into an error from LD when compiling libgcc(part of the gcc compilation process) that has been driving me mad!
The command is this:
/usr/llvm-gcc-4.2-2.8.source/build/./gcc/xgcc \
-B/usr/llvm-gcc-4.2_2.8.source/build/./gcc \
-B/usr/local/arm-apple-darwin/bin \
-B/usr/local/arm-apple-darwin/lib \
-isystem /usr/local/arm-apple-darwin/include \
-isystem /usr/local/arm-apple-darwin/sys-include \
-O2 -g -W -Wall -Wwrite-strings -wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -fno-inline -dynamiclib -nodefaultlibs -W1,-dead_strip \
-marm \
-install_name /usr/local/arm-apple-darwin/lib/libgcc_s.1.dylib \
-single_module -o ./libgcc_s.1.dylib.tmp \
-W1,-exported_symbols_list,libgcc/./libgcc.map
-compatibility_version 1 -current_version 1.0
-DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc \
... long list of .o files ... \
-lc
And the result is typically a lot of undefined references to malloc, free, exit, etc. which typically indicate that libc is not getting compiled in. After going through the list of errors that ld is throwing, I see at the top that it is attempting to pull in /usr/lib/libc.a and complains that it is not the correct platform. Okay, that makes sense, so I spent 5 minutes on google and found an answer. Turns out that if I copy the libSystem.dylib and rename it to libc.dylib, that should solve the problem, but it doesn't. I couldn't find a copy of that file on my phone, so I pulled it directly from the SDK. I then get this strange error:
ld64: in /usr/local/arm-apple-darwin/lib/libc.dylib, can't re-map file, errno=22
At this point, I did everything I could think of. I grabbed a fresh copy of my /usr/lib folder from my iphone and confirmed that libSystem.dylib(and libSystem.B.dylib) wasn't there. I unpacked the raw .ipsw package for iOS 4.2.1 and once again, I could not find a copy of libSystem.dylib there either. I unpacked the iPhoneSDK and MacOS SDK and I managed to find a copy of it in both, but that error just kept persisting. I copied libSystem.dylib, libSystem.B.dylib, tried all sorts of combinations of renaming to libc.dylib and still nothing but errors. I can't find a way to get it to recognize the file and link against it. I also tried linking against the libc.a located in the iphone SDK and that didn't work either. I checked what ./xgcc was firing off, and it was my freshly built copy of arm-apple-darwin-ld64 which should be fine.
A little bit of background here. I built LLVM+Clang 2.8 with no errors, and I rebuilt the ODCCTools with some light modifications to get it to compile on Cygwin(I'll post my changes in a patch along with a tutorial if I can get this to work). I also grabbed the iphone-dev "includes" and "csu" project and those completed successfully, although there really is no point to them since I can't get it to link against crt0.a. I'm running out of ideas here.
Can anyone help me out on this?
I think I may have found out the error. Deep inside ODCCTools, inside ld.cpp on line 2905 it was failing to re-map the file(hence the wonderful message). Since the file was small enough to not worry about it, I just temporarily removed that remapping and just re-addressed the pointer. I'll spend a little time and come up with a better fix for long term solution(and a patch for ODCCTools to work under Cygwin).
If everything goes as planned, then I'll have the GCC compiler cross compiling for iPhone under Cygwin later tonight.

make arm architecture c library in mac

I'm trying to make my own c library in Mac and include it to my iphone program.
The c code is simple , like this:
math.h:
int myPow2(int);
math.c:
#include "math.h"
int myPow2(int num) {
return num*num;
}
I search how to make the c library file ( .a or .lib ..etc) seems need to use gcc compiler (Is there other methods?) so I use this command:
gcc -c math.c -o math.o
ar rcs libmath.a math.o
And include it in iPhone Project. Now it has the problem when build xcode iphone project.
"file was built for unsupported file
format which is not the architecture
being linked"
I found some pages discuss about the problem, but no detail how to make the i386/arm architecture library. And I finally use this command to do it:
gcc -arch i386 -c math.c -o math.o
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1 -c math.c -o math.o
I dont know if this method is correct? Or there has another method to do it?
What Bavarious said.
Add a new target to your project. When XCode asks you what template to use, chose "Static Library".
Add the files for the library to that target. Add the static library target as a dependency of your main executable target. Add the library that gets built to your main executable target. Voila!

iPhone static library distribution and release build errors (but not for debug)

Update
Daniel was close, it just wasn't the search path. The Prefix Header under GCC 4.2 was set to:
$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h
I missed that when I was combing through the first 2 times.
I removed it and now all is well.
Original Question
I have been using/building products with a static libraries for about a week now with no issues.
For the first time, I tried to make a distribution build (for ad hoc testing) and I am getting errors all over the place.
The errors, strangely say that it can't find Appkit headers. Which is odd because it is an iPhone app and shouldn't be linking to Appkit headers
Additionally, the library name, "libFJSCodeDebug.a" turns red while when I switch from debug to distribution/release. I figure this must be a big clue.
To test, I duplicated the debug configuration and renamed it release. This built fine. So it seems the problem is somewhere in the configuration. Below is a snippet of what I get in Xcode when I build. (Note: I named my target FJSCodeDebug even though it will be used for both debug and release builds)
Building target “FJSCodeDebug” of project “FJSCode” with configuration “Release” — (169 errors)
Checking Dependencies
cd /[redacted]/FJSCode
setenv PATH "/DeveloperBeta/Platforms/iPhoneOS.platform/Developer/usr/bin:/DeveloperBeta/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/DeveloperBeta/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -x objective-c-header -arch armv6 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -Wreturn-type -Wunused-variable -isysroot /DeveloperBeta/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk -gdwarf-2 -mthumb -miphoneos-version-min=3.0 -iquote /[redacted]/build/FJSCode.build/Release-iphoneos/FJSCodeDebug.build/FJSCodeDebug-generated-files.hmap -I/[redacted]/build/FJSCode.build/Release-iphoneos/FJSCodeDebug.build/FJSCodeDebug-own-target-headers.hmap -I/[redacted]/build/FJSCode.build/Release-iphoneos/FJSCodeDebug.build/FJSCodeDebug-all-target-headers.hmap -iquote /U[redacted]/build/FJSCode.build/Release-iphoneos/FJSCodeDebug.build/FJSCodeDebug-project-headers.hmap -F/[redacted]/build/Release-iphoneos -I/[redacted]/build/Release-iphoneos/include -I/Users/coreyfloyd/Xcode/ProductionProjects/build/FJSCode.build/Release-iphoneos/FJSCodeDebug.build/DerivedSources/armv6 -I/[redacted]/build/FJSCode.build/Release-iphoneos/FJSCodeDebug.build/DerivedSources -c /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h -o /var/folders/R+/R+ofDLtuH1GOYQ1ZQ2C5mk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/AppKit-gihvhjsfuggoevbehiszhgrzcska/AppKit.h.gch
/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:11:33: error: AppKit/AppKitDefines.h: No such file or directory
/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:12:32: error: AppKit/AppKitErrors.h: No such file or directory
/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:13:37: error: AppKit/NSGraphicsContext.h: No such file or directory
/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:14:35: error: AppKit/NSAccessibility.h: No such file or directory
/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:15:32: error: AppKit/NSActionCell.h: No such file or directory
...... (continues for everything in AppKit)......
Build failed (169 errors)
I'm looking for 1 of 2 solutions:
Obviously, fix the release build to not get these errors
OR
Tweak the debug configuration to have all the important settings that a release configuration requires.
Any ideas??
This
-c /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h
leads me to believe your build target is trying to compile AppKit.h for some reason (while I don't think it should be doing that at all), and/or it's looking for it in the wrong place (i.e. in the root /System instead of in the SDK /Developer/Platforms/...).
You should double check your build settings library/frameworks search paths, and that AppKit.h isn't in the compile phase.
Does your project include Mac OS products? Are you sure you haven't accidently included a Mac library/framework in your frameworks group?
In SDK2.2.1, I don't know why, but the thing that always gets me is when "Active SDK" and "Active Executable" become out of sync (in the build configuration dropdown). This leads to weird linker errors where the iPhone tries to dynamically link against its libraries. This setting seems to occasionally go out of sync whenever I switch from debug/release or device/simulator.
Perhaps its a similar case, its hard to tell without seeing the actual project settings.