链接错误4.3 ios

时间:2012-03-06 19:07:19

标签: xcode linker

刚刚从xcode 4.1更新到4.3因为我需要一些功能。但现在我的一个旧程序不再工作了。它并不复杂,并且不需要和xcode 4.1中的其他框架

这是我的错误:

Ld "/Users/rickvugts/Library/Developer/Xcode/DerivedData/myappname-gzvclbdfiudwvlbjjxtyfixndpkd/Build/Products/Debug-iphonesimulator/xxxx.app/xxxx" normal i386
    cd "/Users/xxxx/Documents/Development/Mobile/xxxx/v2"
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk
-L/Users/xxxx/Library/Developer/Xcode/DerivedData/myappname-gzvclbdfiudwvlbjjxtyfixndpkd/Build/Products/Debug-iphonesimulator
-F/Users/xxxx/Library/Developer/Xcode/DerivedData/myappname-gzvclbdfiudwvlbjjxtyfixndpkd/Build/Products/Debug-iphonesimulator
-filelist "/Users/xxx/Library/Developer/Xcode/DerivedData/myappname-gzvclbdfiudwvlbjjxtyfixndpkd/Build/Intermediates/xxx.build/Debug-iphonesimulator/xxxxr.build/Objects-normal/i386/xxxx.LinkFileList"
-mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/xxxx/Library/Developer/Xcode/DerivedData/myappname-gzvclbdfiudwvlbjjxtyfixndpkd/Build/Products/Debug-iphonesimulator/xxx.app/xxxx"

Undefined symbols for architecture i386:   "_gGeboorteDatum", referenced from:
      -[myappnameAppDelegate application:didFinishLaunchingWithOptions:] in myappnameAppDelegate.o
      -[myappnameAppDelegate dealloc] in myappnameAppDelegate.o
      -[myappnameViewController touchesBegan:withEvent:] in myappnameViewController.o
      -[myResults viewDidLoad] in myResults.o
      -[myappnameAppDelegate application:didFinishLaunchingWithOptions:] in myappnameAppDelegate.o
      -[myappnameAppDelegate dealloc] in myappnameAppDelegate.o
      -[myappnameViewController touchesBegan:withEvent:] in myappnameViewController.o
      -[myResults viewDidLoad] in myResults.o
      -[myappnameAppDelegate application:didFinishLaunchingWithOptions:] in myappnameAppDelegate.o
      -[myappnameAppDelegate dealloc] in myappnameAppDelegate.o
      -[myappnameViewController touchesBegan:withEvent:] in myappnameViewController.o
      -[myResults viewDidLoad] in myResults.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

-----



"_gGeboorteDatum", referenced from:

-[myappnameAppDelegate application:didFinishLaunchingWithOptions:] in myappnameAppDelegate.o

-[myappnameAppDelegate dealloc] in myappnameAppDelegate.o

-[myappnameViewController touchesBegan:withEvent:] in myappnameViewController.o

-[myResults viewDidLoad] in myResults.o

-[myappnameAppDelegate application:didFinishLaunchingWithOptions:] in myappnameAppDelegate.o

-[myappnameAppDelegate dealloc] in myappnameAppDelegate.o

-[myappnameViewController touchesBegan:withEvent:] in myappnameViewController.o

-[myResults viewDidLoad] in myResults.o

-[myappnameAppDelegate application:didFinishLaunchingWithOptions:] in myappnameAppDelegate.o

-[myappnameAppDelegate dealloc] in myappnameAppDelegate.o

-[myappnameViewController touchesBegan:withEvent:] in myappnameViewController.o

-[myResults viewDidLoad] in myResults.o

Symbol(s) not found for architecture i386

Clang: error: linker command failed with exit code 1 (use -v to see invocation)

其中myappname是应用程序的名称,myResults是第二个屏幕。

我已经将“仅构建活动架构”设置为“是”,但这并没有成功。

gGeboortedatum是一个全局NSDate变量。我只是将其从NSString更改为NSDate。

1 个答案:

答案 0 :(得分:0)

当我有一个全局NSData变量时似乎出错了。将其更改为NSString(然后将其转换)。这有效,但当然不是很好。