对于架构x86_64,无法映射文件,errno = 22

时间:2013-05-08 08:49:07

标签: objective-c macos

我有编译问题

Ld /Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Products/Debug/RemoteDesktop.app/Contents/MacOS/RemoteDesktop normal x86_64
    cd /Users/ppdeveloper/Desktop/app/RemoteDesktop
    setenv MACOSX_DEPLOYMENT_TARGET 10.5
    /Volumes/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Products/Debug -F/Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Products/Debug -filelist /Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Intermediates/RemoteDesktop.build/Debug/RemoteDesktop.build/Objects-normal/x86_64/RemoteDesktop.LinkFileList -mmacosx-version-min=10.5 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -framework Cocoa -framework Foundation -framework AppKit /Users/ppdeveloper/Desktop/app/RemoteDesktop/RemoteDesktop/include -fobjc-link-runtime -framework Foundation -framework CoreData -framework AppKit -framework CoreFoundation -lz -framework Cocoa -o /Users/ppdeveloper/Library/Developer/Xcode/DerivedData/RemoteDesktop-fqnrzezhilkdilddgkfsepetkons/Build/Products/Debug/RemoteDesktop.app/Contents/MacOS/RemoteDesktop

ld: **can't map file, errno=22 for architecture x86_64**

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

1 个答案:

答案 0 :(得分:10)

我不知道项目/Users/ppdeveloper/Desktop/app/RemoteDesktop/RemoteDesktop/include来自你的编译/链接选项,但它看起来像一个目录,所以它可能缺少一个前面的-I来声明你在这个目录中搜索

如果链接器尝试将此目录作为文件加载,则会看到EINVAL又名错误22