I am trying to use ImageMagick 6.7.3 with a C++ project in eclipse on my mac air running osx lion. I have been fighting with it for a few days googling and researching I can't seem to get the linker to find the files no matter what I try. Here is my linker log from eclipse does anyone have any idea why this isnt working?
I have populated the library search path and the include path settings in properties -> c/c++ build -> settings menus with the paths to the ImageMagick installation. Any help would be greatly appreciated!!!
Build of configuration Debug for project ImportingLibrary **
make all
Building target: ImportingLibrary
Invoking: MacOS X C++ Linker
g++ -L/Users/jon/Programs/ImageMagick-6.7.3/lib -o "ImportingLibrary" ./src/ChoicePath.o ./src/ImageCreation.o ./src/NavFocus.o ./src/RouteInputAnalyzer.o
Undefined symbols for architecture x86_64:
"_MagickWandGenesis", referenced from:
_main in NavFocus.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: * [ImportingLibrary] Error 1
Build Finished **
Build of configuration Release for project ImportingLibrary **
make all
Building file: ../src/NavFocus.cpp
Invoking: GCC C++ Compiler
g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/NavFocus.d" -MT"src/NavFocus.d" -o "src/NavFocus.o" "../src/NavFocus.cpp"
../src/NavFocus.cpp:13:29: warning: wand/MagickWand.h: No such file or directory
../src/NavFocus.cpp: In function 'int main()':
../src/NavFocus.cpp:19: error: 'MagickWandGenesis' was not declared in this scope
make: * [src/NavFocus.o] Error 1
Build Finished **
Does anybody know where to get python-MySQLdb compiled for the arm iPhone architecture? or how to do it?
I'm stucked at this point:
:~/MySQL-python-1.2.3 root# python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.darwin-10.5-arm-2.5/MySQLdb
running build_ext
building '_mysql' extension
arm-apple-darwin9-gcc -undefined dynamic_lookup -dynamiclib build/temp.darwin-10.5-arm-2.5/_mysql.o -L/usr/local/arm-apple-darwin/lib/ -L/private/var/root/mysql/lib/mysql -lmysqlclient_r -lz -lm -o build/lib.darwin-10.5-arm-2.5/_mysql.dylib
ld: library not found for -lmysqlclient_r
collect2: ld returned 1 exit status
error: command 'arm-apple-darwin9-gcc' failed with exit status 1
i solved the previous problem.....it was the threadsafe = True in site.cfg i had to put False.
Now i have another problem really similar
python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.darwin-10.5-arm-2.5/MySQLdb
running build_ext
building '_mysql' extension
arm-apple-darwin9-gcc -undefined dynamic_lookup -dynamiclib build/temp.darwin-10.5-arm-2.5/_mysql.o -L/usr/local/arm-apple-darwin/lib/ -L/private/var/root/mysql/lib/mysql -lmysqlclient -lz -lm -o build/lib.darwin-10.5-arm-2.5/_mysql.dylib
ld: library not found for -lm
collect2: ld returned 1 exit status
error: command 'arm-apple-darwin9-gcc' failed with exit status 1
Which Library is needed for -lm?? (for example for -lz it needs zlib library).
I built an iPhone toolchain on Ubuntu based on the directions at http://www.saurik.com/id/4 . When I try to compile something as simple as:
int main () {
return 4;
}
It gives me this:
Undefined symbols:
"_main", referenced from:
_main$non_lazy_ptr in crt1.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
This happens for both the crt1.o from the iPhone SDK and from the http://code.google.com/p/iphone-dev/wiki/Building . Using -save-temps, I found out that the cc1 command produced no output. Why is that? Is there something wrong with my specs file?
Using built-in specs.
Target: arm-apple-darwin10
Configured with: ../llvm-gcc-4.2-2.8.source/configure --target=arm-apple-darwin10 --prefix=/home/kevin/it --with-sysroot=/home/kevin/is --enable-languages=c,c++,objc,obj-c++ --with-as=/home/kevin/it/bin/arm-apple-darwin10-as --with-ld=/home/kevin/it/bin/arm-apple-darwin10-ld --enable-wchar_t=no --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658)
/home/kevin/it/libexec/gcc/arm-apple-darwin10/4.2.1/cc1 -quiet -v -D__DYNAMIC__ test.c -miphoneos-version-min=3.0 -fPIC -fno-builtin-strcat -fno-builtin-strcpy -quiet -dumpbase test.c -auxbase test -version -o /tmp/ccyVHwhV.s
ignoring nonexistent directory "/home/kevin/is/usr/local/include"
ignoring nonexistent directory "/home/kevin/is/home/kevin/it/lib/gcc/arm-apple-darwin10/4.2.1/../../../../arm-apple-darwin10/include"
ignoring nonexistent directory "/home/kevin/is/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/home/kevin/it/lib/gcc/arm-apple-darwin10/4.2.1/include
/home/kevin/is/usr/include
/home/kevin/is/System/Library/Frameworks (framework directory)
End of search list.
GNU C version 4.2.1 (Based on Apple Inc. build 5658) (arm-apple-darwin10)
compiled by GNU C version 4.4.5.
GGC heuristics: --param ggc-min-expand=150 --param ggc-min-heapsize=131072
Compiler executable checksum: 47b826ed9d7049d0b0acd26e928e4c9e
/home/kevin/it/bin/arm-apple-darwin10-as -arch arm -force_cpusubtype_ALL -o /tmp/cck3gviA.o /tmp/ccyVHwhV.s
ERROR: ld.so: object '/etc/override.so' from /etc/ld.so.preload cannot be preloaded: ignored.
ERROR: ld.so: object '/etc/override.so' from /etc/ld.so.preload cannot be preloaded: ignored.
/home/kevin/it/libexec/gcc/arm-apple-darwin10/4.2.1/collect2 -dynamic -arch arm -force_cpusubtype_ALL -iphoneos_version_min 3.0 -syslibroot /home/kevin/is -weak_reference_mismatches non-weak -o test -lcrt1.o -L/home/kevin/is/usr/lib -L/home/kevin/it/lib/gcc/arm-apple-darwin10/4.2.1 -L/home/kevin/it/lib/gcc/arm-apple-darwin10/4.2.1/../../../../arm-apple-darwin10/lib /tmp/cck3gviA.o -lgcc -lSystem
ERROR: ld.so: object '/etc/override.so' from /etc/ld.so.preload cannot be preloaded: ignored.
ld warning: unknown option to -iphoneos_version_min, not 1.x or 2.x
Undefined symbols:
"_main", referenced from:
_main$non_lazy_ptr in crt1.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Never mind, it turns out that I forgot to compile llvm along with it, and I didn't realize that obviously llvm-gcc would need llvm to function correctly.
thanks to zoul for sharing his openal avaudioplayer alternative!! its exactly what i needed,
heres my problem.. i cant build a distribution build w/o getting
general gcc-4.2 failed with error code 1,
i built my code within the finch demo project and figured it might be
something i did.
so i re-downloaded demo... duplicated release, renamed distribution
and same thing...
know what im missing?
thanks!!
built clean finch demo in device 3.0 distribution,
it works for device debug so i think codesigning is ok
-
here is the error code:
ProcessPCH /var/folders/vB/vBGLPzEOHIaZaBe67EuRZU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Demo_Prefix-dhjhmgdrpwujnmakgukffcldlmim/Demo_Prefix.pch.gch Demo_Prefix.pch normal armv6 objective-c com.apple.compilers.gcc.4_2
cd /Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/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 -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.3.sdk -fvisibility=hidden -gdwarf-2 -mthumb -miphoneos-version-min=3.1.3 -iquote /Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Demo.build/Release-iphoneos/Demo.build/Demo-generated-files.hmap -I/Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Demo.build/Release-iphoneos/Demo.build/Demo-own-target-headers.hmap -I/Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Demo.build/Release-iphoneos/Demo.build/Demo-all-target-headers.hmap -iquote /Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Demo.build/Release-iphoneos/Demo.build/Demo-project-headers.hmap -F/Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Release-iphoneos -I/Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Release-iphoneos/include -I/Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Demo.build/Release-iphoneos/Demo.build/DerivedSources/armv6 -I/Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Demo.build/Release-iphoneos/Demo.build/DerivedSources -c /Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/Demo_Prefix.pch -o /var/folders/vB/vBGLPzEOHIaZaBe67EuRZU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Demo_Prefix-dhjhmgdrpwujnmakgukffcldlmim/Demo_Prefix.pch.gch
arm-apple-darwin10-gcc-4.2.1: /Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/Demo_Prefix.pch: No such file or directory
arm-apple-darwin10-gcc-4.2.1: warning: '-x objective-c-header' after last input file has no effect
arm-apple-darwin10-gcc-4.2.1: no input files
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Aha, my fault, that’s a bug. Wrong prefix header setting in the Release build mode. Fixed, thank you. To fix your project: right-click your target, select Get Info, switch to the Build tab, set Configuration to All Configurations, search for Prefix Header and set it to prefix.pch.
I'm trying to compile some code for the iphone simulator but am getting this error:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -O3 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk -Os -O3 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk -Os -x objective-c -I../../include -c version.c
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:29,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:14,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:80,
from version.c:11:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:166: error: expected declaration specifiers or ‘...’ before ‘SecPadding’
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:196: error: expected declaration specifiers or ‘...’ before ‘SecPadding’
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:228: error: expected declaration specifiers or ‘...’ before ‘SecPadding’
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:257: error: expected declaration specifiers or ‘...’ before ‘SecPadding’
make: *** [version.o] Error 1
However, if I compile for the actual iphone, it works fine:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -O3 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk -arch armv6 -Os -O3 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk -arch armv6 -Os -x objective-c -I../../include -c version.c
This problem happens with a file as simple as just including Foundation.h with no other code:
#import <Foundation/Foundation.h>
Any ideas on what this is about? The strange this is that I would expect this to fail for both iphone and the simulator.
EDIT: fyi, I'm not using XCode. This is a large, multi-platform project using Makefiles. The commands you see above were emitted from the Makefile.
I saw the same thing. The fix is to add a -miphoneos-version-min=3.0 compiler directive.
The problem only happens if you use SDK 3.0 with the iphone simulator. Using SDK 2.0 (with gcc 4.0) will compile. This appears to be what XCode uses by default.
Its very odd that this problem is only for the simulator and not for the iphone itself. Also strange is that gcc4.2 won't compile with simulator sdk 2.0-- you have to use gcc4.0.
For the curious, I wrote a makefile that demonstrates the problem:
IPHONE_GCC_VER = 4.0
IPHONE_SDK_VER = 3.0
IPHONE_DEV_PATH = /Developer/Platforms/iPhoneOS.platform/Developer
IPHONE_SDK = $(IPHONE_DEV_PATH)/SDKs/iPhoneOS$(IPHONE_SDK_VER).sdk
IPHONE_GCC = $(IPHONE_DEV_PATH)/usr/bin/gcc-$(IPHONE_GCC_VER)
SIMULATOR_GCC_VER = 4.0
SIMULATOR_SDK_VER = 2.0
SIMULATOR_DEV_PATH= /Developer/Platforms/iPhoneSimulator.platform/Developer
SIMULATOR_SDK = $(SIMULATOR_DEV_PATH)/SDKs/iPhoneSimulator$(SIMULATOR_SDK_VER).sdk
SIMULATOR_GCC = $(SIMULATOR_DEV_PATH)/usr/bin/gcc-$(SIMULATOR_GCC_VER)
TEST_FILE=/tmp/test.m
all: info make-test-file
$(IPHONE_GCC) -isysroot $(IPHONE_SDK) -arch armv6 -c $(TEST_FILE)
$(SIMULATOR_GCC) -isysroot $(SIMULATOR_SDK) -arch i386 -c $(TEST_FILE)
info:
#echo "iphone gcc : $(IPHONE_GCC_VER)"
#echo "iphone sdk : $(IPHONE_SDK_VER)"
#echo "simulator gcc: $(SIMULATOR_GCC_VER)"
#echo "simulator sdk: $(SIMULATOR_SDK_VER)"
#echo ""
make-test-file:
echo "#import <Foundation/Foundation.h>" > $(TEST_FILE)
The defaults are the ones that work, but you can override them on the command-line. For example:
$ make -f Makefile.iphone-error-demo SIMULATOR_SDK_VER=3.0 SIMULATOR_GCC_VER=4.0
iphone gcc : 4.0
iphone sdk : 3.0
simulator gcc: 4.0
simulator sdk: 3.0
echo "#import <Foundation/Foundation.h>" > /tmp/test.m
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk -arch armv6 -c /tmp/test.m
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk -arch i386 -c /tmp/test.m
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:29,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:14,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:80,
from /tmp/test.m:1:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:166: error: syntax error before ÔSecPaddingÕ
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:196: error: syntax error before ÔSecPaddingÕ
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:228: error: syntax error before ÔSecPaddingÕ
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:257: error: syntax error before ÔSecPaddingÕ
make: *** [all] Error 1
or
$ make -f Makefile.iphone-error-demo SIMULATOR_SDK_VER=2.0 SIMULATOR_GCC_VER=4.2
iphone gcc : 4.0
iphone sdk : 3.0
simulator gcc: 4.2
simulator sdk: 2.0
echo "#import <Foundation/Foundation.h>" > /tmp/test.m
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk -arch armv6 -c /tmp/test.m
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk -arch i386 -c /tmp/test.m
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:12,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6,
from /tmp/test.m:1:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6,
from /tmp/test.m:1:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/usr/include/float.h:8:24: error: float.h: No such file or directory
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/DriverServices.h:32,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:125,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:2,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAppleEventDescriptor.h:8,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:107,
from /tmp/test.m:1:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:29:23: error: xmmintrin.h: No such file or directory
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/DriverServices.h:32,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:125,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:2,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAppleEventDescriptor.h:8,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:107,
from /tmp/test.m:1:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:216: error: expected specifier-qualifier-list before Ô__m128Õ
make: *** [all] Error 1
Are you sure your settings are identical between the two projects? I'd bet you accidentally changed some simulator settings.
Right click the framework and click Get Info. Take a look at the path in the Info dialog. It should be short, like "System/Library/Frameworks/"
If it is not, use the Choose button to find the framework underneath the current SDK's folder.
Also, make sure just below the path you see the option "Relative to Current SDK" selected.
When you added the frameworks to your project, did you set the checkbox to YES when asked if you wanted to copy the framework into the project folder. If so, the checkbox should be set to NO.
Does this also happen if you create a new project and attempt to run without adding anything, because it is possible that you've accidentally changed the compile flags in that project
This should be fixed by adding this to the compiler options:
-D__IPHONE_OS_VERSION_MIN_REQUIRED=30000
I encountered this problem when changing a project from sdk 3.2 to 4.1. Turns out the solution was changing the iOS Deployment Target in the build settings of my project from 2.0 to 3.0.
Right click your project in xcode (if you're using it), build pane, iOS Deployment Target -> 3.0.