gpt4 book ai didi

c++ - 爱特梅尔工作室 : undefined reference to `_read'

转载 作者:行者123 更新时间:2023-11-28 04:48:50 25 4
gpt4 key购买 nike

我开始在 Atmel Studio 中收到以下链接器错误:

c:/program files (x86)/atmel/studio/7.0/toolchain/arm/arm-gnu-toolchain/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m\libc.a(lib_a-readr.o): 
In function `_read_r':
C:\Users\Administrator\Documents\myproj\Debug\readr.c(1,1): error: undefined reference to `_read'

这发生在我向我的项目添加一个virtual 方法之后。这是怎么回事?

最佳答案

就我而言,这个问题与项目配置的链接器设置有关。

通过将链接器设置“Additional Specs”设置为“Use syscall stubs (--specs=nosys.specs)”,提供了 posix 系统调用(如读取和写入)的空系统调用实现。

这些设置位于

Project Properties -> Toolchain -> ARM/GNU Linker -> General -> Additional Specs

关于c++ - 爱特梅尔工作室 : undefined reference to `_read' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48625878/

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