问题:
error: 'asm' undeclared (first use in this function)
原因:
使用了旧的命名法,但使用了新的编译器,导致新的编译器,没有将旧的命令识别为关键字
修改方法
将asm改为__asm__
原文档
https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-112
Do not recognize asm, inline or typeof as akeyword, so that code can use these words as identifiers. You can usethe keywords __asm__, __inline__ and __typeof__instead. -ansi implies -fno-asm
转载请注明原文地址: https://ju.6miu.com/read-965373.html