我正在尝试为使用G ++编译的C ++ Mac应用程序设置应用程序图标。我创建了一个如下所示的Info.plist文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIconFile</key>
<string>foo.icns</string>
</dict>
然后我按照这样编译它:
g++ foo.cpp -o foo Info.plist
它返回:
ld: warning: ignoring file Info.plist, file was built for unsupported file format
( 0x3C 0x3F 0x78 0x6D 0x6C 0x20 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x3D 0x22 0x31 )
which is not the architecture being linked (x86_64): Info.plist
此错误意味着什么,我该如何解决?