gpt4 book ai didi

c - 如何修复ld : warning: ignoring file Atome error?

转载 作者:行者123 更新时间:2023-11-30 18:45:29 28 4
gpt4 key购买 nike

我在链接时遇到此错误:

ld: warning: ignoring file /Users/martin/Documents/flanday, file was built for unsupported file format ( 0x23 0x69 0x6E 0x63 0x6C 0x75 0x64 0x65 0x20 0x3C 0x73 0x74 0x64 0x69 0x6F 0x2E ) which is not the architecture being linked (x86_64): /Users/martin/Documents/flanday Undefined symbols for architecture x86_64: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

如何修复它?

最佳答案

0x23 0x69 0x6E 0x63 0x6C 0x75 0x64 0x65 0x20 0x3C 0x73 0x74 0x64 0x69 0x6F 0x2E

如果将这些字节解释为 ASCII,则会得到 #include <stdio.

换句话说,您将一个 C 源文件传递给链接器,链接器尝试将其解释为目标文件,但显然失败了。

要解决此问题,请确保您的源文件不会作为 ld 的输入传递.

关于c - 如何修复ld : warning: ignoring file Atome error?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54517789/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com