内联函数声明但未定义 “warning: inline function `*` declared but never defined”

1、详情请查看:http://blog.youkuaiyun.com/superbfly/article/details/52290606

Adding the -fgnu89-inline flag fixes the warnings, by enabling "traditional GNU semantics for inline functions when in C99 mode".

编译程序的时候总报 “内联函数声明但未定义” 的警告。

解决方法就是在编译时加上-fgnu89-inline

次编译就没有问题了。


2、我用的是 cmake 编译,增加参数 -fgnu89-inline ,参考代码如下:

add_definitions(-fgnu89-inline)

参考:cmake参数 与 命令详解


C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino: In function 'void setup()': C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:8:3: error: 'hlscl' was not declared in this scope hlscl.pSerial = &Serial1; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino: In function 'void loop()': C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:15:3: error: 'hlscl' was not declared in this scope hlscl.WritePosEx(0xfe, 4095, 60, 50, 500); ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\CalibrationOfs.ino: In function 'void setup()': C:\Users\80967\Desktop\HLSCL\Broadcast\CalibrationOfs.ino:7:6: error: redefinition of 'void setup()' void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:4:6: note: 'void setup()' previously defined here void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\CalibrationOfs.ino:12:3: error: 'hlscl' was not declared in this scope hlscl.pSerial = &Serial1; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\CalibrationOfs.ino: In function 'void loop()': C:\Users\80967\Desktop\HLSCL\Broadcast\CalibrationOfs.ino:18:6: error: redefinition of 'void loop()' void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:12:6: note: 'void loop()' previously defined here void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\CalibrationOfs.ino:20:13: error: 'slscl' was not declared in this scope int pos = slscl.ReadPos(1); ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\CalibrationOfs.ino:21:7: error: 'hlscl' was not declared in this scope if(!hlscl.getLastError()){ ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\FeedBack.ino: At global scope: C:\Users\80967\Desktop\HLSCL\Broadcast\FeedBack.ino:10:1: error: 'HLSCL' does not name a type; did you mean 'SCSCL'? HLSCL hlscl; ^~~~~ SCSCL C:\Users\80967\Desktop\HLSCL\Broadcast\FeedBack.ino: In function 'void setup()': C:\Users\80967\Desktop\HLSCL\Broadcast\FeedBack.ino:13:6: error: redefinition of 'void setup()' void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:4:6: note: 'void setup()' previously defined here void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\FeedBack.ino:20:3: error: 'hlscl' was not declared in this scope hlscl.pSerial = &Serial1; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\FeedBack.ino: In function 'void loop()': C:\Users\80967\Desktop\HLSCL\Broadcast\FeedBack.ino:24:6: error: redefinition of 'void loop()' void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:12:6: note: 'void loop()' previously defined here void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\FeedBack.ino:33:3: error: 'hlscl' was not declared in this scope hlscl.FeedBack(1); ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Ping.ino: At global scope: C:\Users\80967\Desktop\HLSCL\Broadcast\Ping.ino:7:1: error: 'HLSCL' does not name a type; did you mean 'SCSCL'? HLSCL hlscl; ^~~~~ SCSCL C:\Users\80967\Desktop\HLSCL\Broadcast\Ping.ino:9:5: error: redefinition of 'int LEDpin' int LEDpin = 13; ^~~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\FeedBack.ino:11:5: note: 'int LEDpin' previously defined here int LEDpin = 13; ^~~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Ping.ino: In function 'void setup()': C:\Users\80967\Desktop\HLSCL\Broadcast\Ping.ino:10:6: error: redefinition of 'void setup()' void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:4:6: note: 'void setup()' previously defined here void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Ping.ino:17:3: error: 'hlscl' was not declared in this scope hlscl.pSerial = &Serial1; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Ping.ino: In function 'void loop()': C:\Users\80967\Desktop\HLSCL\Broadcast\Ping.ino:21:6: error: redefinition of 'void loop()' void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:12:6: note: 'void loop()' previously defined here void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Ping.ino:23:12: error: 'hlscl' was not declared in this scope int ID = hlscl.Ping(1); ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\ProgramEprom.ino: At global scope: C:\Users\80967\Desktop\HLSCL\Broadcast\ProgramEprom.ino:7:5: error: redefinition of 'int LEDpin' int LEDpin = 13; ^~~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\FeedBack.ino:11:5: note: 'int LEDpin' previously defined here int LEDpin = 13; ^~~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\ProgramEprom.ino:8:1: error: 'HLSCL' does not name a type; did you mean 'SCSCL'? HLSCL hlscl; ^~~~~ SCSCL C:\Users\80967\Desktop\HLSCL\Broadcast\ProgramEprom.ino: In function 'void setup()': C:\Users\80967\Desktop\HLSCL\Broadcast\ProgramEprom.ino:10:6: error: redefinition of 'void setup()' void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:4:6: note: 'void setup()' previously defined here void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\ProgramEprom.ino:15:3: error: 'hlscl' was not declared in this scope hlscl.pSerial = &Serial1; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\ProgramEprom.ino:19:22: error: 'HLSCL_ID' was not declared in this scope hlscl.writeByte(1, HLSCL_ID, 2);//ID ^~~~~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\ProgramEprom.ino:19:22: note: suggested alternative: 'SCSCL_ID' hlscl.writeByte(1, HLSCL_ID, 2);//ID ^~~~~~~~ SCSCL_ID C:\Users\80967\Desktop\HLSCL\Broadcast\ProgramEprom.ino: In function 'void loop()': C:\Users\80967\Desktop\HLSCL\Broadcast\ProgramEprom.ino:24:6: error: redefinition of 'void loop()' void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:12:6: note: 'void loop()' previously defined here void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\RegWritePos.ino: At global scope: C:\Users\80967\Desktop\HLSCL\Broadcast\RegWritePos.ino:3:1: error: 'HLSCL' does not name a type; did you mean 'SCSCL'? HLSCL hlscl; ^~~~~ SCSCL C:\Users\80967\Desktop\HLSCL\Broadcast\RegWritePos.ino: In function 'void setup()': C:\Users\80967\Desktop\HLSCL\Broadcast\RegWritePos.ino:5:6: error: redefinition of 'void setup()' void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:4:6: note: 'void setup()' previously defined here void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\RegWritePos.ino:9:3: error: 'hlscl' was not declared in this scope hlscl.pSerial = &Serial1; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\RegWritePos.ino: In function 'void loop()': C:\Users\80967\Desktop\HLSCL\Broadcast\RegWritePos.ino:13:6: error: redefinition of 'void loop()' void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:12:6: note: 'void loop()' previously defined here void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\RegWritePos.ino:16:3: error: 'hlscl' was not declared in this scope hlscl.RegWritePosEx(1, 4095, 60, 50, 500); ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino: At global scope: C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino:7:1: error: 'HLSCL' does not name a type; did you mean 'SCSCL'? HLSCL hlscl; ^~~~~ SCSCL C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino: In function 'void setup()': C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino:14:6: error: redefinition of 'void setup()' void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:4:6: note: 'void setup()' previously defined here void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino:19:3: error: 'hlscl' was not declared in this scope hlscl.pSerial = &Serial1; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino: In function 'void loop()': C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino:24:6: error: redefinition of 'void loop()' void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:12:6: note: 'void loop()' previously defined here void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino:26:3: error: 'hlscl' was not declared in this scope hlscl.syncReadPacketTx(ID, sizeof(ID), HLSCL_PRESENT_POSITION_L, sizeof(rxPacket));//同步读指令包发送 ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino:26:42: error: 'HLSCL_PRESENT_POSITION_L' was not declared in this scope hlscl.syncReadPacketTx(ID, sizeof(ID), HLSCL_PRESENT_POSITION_L, sizeof(rxPacket));//同步读指令包发送 ^~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino:26:42: note: suggested alternative: 'SCSCL_PRESENT_POSITION_L' hlscl.syncReadPacketTx(ID, sizeof(ID), HLSCL_PRESENT_POSITION_L, sizeof(rxPacket));//同步读指令包发送 ^~~~~~~~~~~~~~~~~~~~~~~~ SCSCL_PRESENT_POSITION_L C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino: At global scope: C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:2:1: error: 'HLSCL' does not name a type; did you mean 'SCSCL'? HLSCL hlscl; ^~~~~ SCSCL C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:4:10: error: redefinition of 'byte ID [2]' byte ID[2]; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino:9:9: note: 'uint8_t ID [2]' previously defined here uint8_t ID[] = {1, 2}; ^~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:5:15: error: conflicting declaration 's16 Position [2]' s16 Position[2]; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino:11:9: note: previous declaration as 'int16_t Position' int16_t Position; ^~~~~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:6:12: error: conflicting declaration 'u16 Speed [2]' u16 Speed[2]; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino:12:9: note: previous declaration as 'int16_t Speed' int16_t Speed; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino: In function 'void setup()': C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:10:6: error: redefinition of 'void setup()' void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:4:6: note: 'void setup()' previously defined here void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:14:3: error: 'hlscl' was not declared in this scope hlscl.pSerial = &Serial1; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:18:10: error: invalid types 'int16_t {aka int}[int]' for array subscript Speed[0] = 60;//最高速度V=60*0.732=43.92rpm ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:19:10: error: invalid types 'int16_t {aka int}[int]' for array subscript Speed[1] = 60;//最高速度V=60*0.732=43.92rpm ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino: In function 'void loop()': C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:26:6: error: redefinition of 'void loop()' void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:12:6: note: 'void loop()' previously defined here void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:29:13: error: invalid types 'int16_t {aka int}[int]' for array subscript Position[0] = 4095; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:30:13: error: invalid types 'int16_t {aka int}[int]' for array subscript Position[1] = 4095; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:31:3: error: 'hlscl' was not declared in this scope hlscl.SyncWritePosEx(ID, 2, Position, Speed, ACC, Torque); ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:35:13: error: invalid types 'int16_t {aka int}[int]' for array subscript Position[0] = 0; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:36:13: error: invalid types 'int16_t {aka int}[int]' for array subscript Position[1] = 0; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino: At global scope: C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:2:1: error: 'HLSCL' does not name a type; did you mean 'SCSCL'? HLSCL hlscl; ^~~~~ SCSCL C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:4:10: error: redefinition of 'byte ID [2]' byte ID[2]; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino:9:9: note: 'uint8_t ID [2]' previously defined here uint8_t ID[] = {1, 2}; ^~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:5:12: error: conflicting declaration 's16 Speed [2]' s16 Speed[2]; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncRead.ino:12:9: note: previous declaration as 'int16_t Speed' int16_t Speed; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:6:11: error: redefinition of 'byte ACC [2]' byte ACC[2]; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:7:6: note: 'byte ACC [2]' previously declared here byte ACC[2]; ^~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:7:13: error: redefinition of 'u16 Torque [2]' u16 Torque[2]; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWritePos.ino:8:5: note: 'u16 Torque [2]' previously declared here u16 Torque[2]; ^~~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino: In function 'void setup()': C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:9:6: error: redefinition of 'void setup()' void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:4:6: note: 'void setup()' previously defined here void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:13:3: error: 'hlscl' was not declared in this scope hlscl.pSerial = &Serial1; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino: In function 'void loop()': C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:25:6: error: redefinition of 'void loop()' void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:12:6: note: 'void loop()' previously defined here void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:28:10: error: invalid types 'int16_t {aka int}[int]' for array subscript Speed[0] = 60; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:29:10: error: invalid types 'int16_t {aka int}[int]' for array subscript Speed[1] = 60; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:30:3: error: 'hlscl' was not declared in this scope hlscl.SyncWriteSpe(ID, 2, Speed, ACC, Torque); ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:34:10: error: invalid types 'int16_t {aka int}[int]' for array subscript Speed[0] = 0; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:35:10: error: invalid types 'int16_t {aka int}[int]' for array subscript Speed[1] = 0; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:40:10: error: invalid types 'int16_t {aka int}[int]' for array subscript Speed[0] = -60; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:41:10: error: invalid types 'int16_t {aka int}[int]' for array subscript Speed[1] = -60; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:46:10: error: invalid types 'int16_t {aka int}[int]' for array subscript Speed[0] = 0; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\SyncWriteSpe.ino:47:10: error: invalid types 'int16_t {aka int}[int]' for array subscript Speed[1] = 0; ^ C:\Users\80967\Desktop\HLSCL\Broadcast\WriteEle.ino: At global scope: C:\Users\80967\Desktop\HLSCL\Broadcast\WriteEle.ino:3:1: error: 'HLSCL' does not name a type; did you mean 'SCSCL'? HLSCL hlscl; ^~~~~ SCSCL C:\Users\80967\Desktop\HLSCL\Broadcast\WriteEle.ino: In function 'void setup()': C:\Users\80967\Desktop\HLSCL\Broadcast\WriteEle.ino:5:6: error: redefinition of 'void setup()' void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:4:6: note: 'void setup()' previously defined here void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\WriteEle.ino:9:3: error: 'hlscl' was not declared in this scope hlscl.pSerial = &Serial1; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\WriteEle.ino: In function 'void loop()': C:\Users\80967\Desktop\HLSCL\Broadcast\WriteEle.ino:14:6: error: redefinition of 'void loop()' void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:12:6: note: 'void loop()' previously defined here void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\WriteEle.ino:17:3: error: 'hlscl' was not declared in this scope hlscl.WriteEle(1, 300); ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\WritePos.ino: At global scope: C:\Users\80967\Desktop\HLSCL\Broadcast\WritePos.ino:3:1: error: 'HLSCL' does not name a type; did you mean 'SCSCL'? HLSCL hlscl; ^~~~~ SCSCL C:\Users\80967\Desktop\HLSCL\Broadcast\WritePos.ino: In function 'void setup()': C:\Users\80967\Desktop\HLSCL\Broadcast\WritePos.ino:5:6: error: redefinition of 'void setup()' void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:4:6: note: 'void setup()' previously defined here void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\WritePos.ino:9:3: error: 'hlscl' was not declared in this scope hlscl.pSerial = &Serial1; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\WritePos.ino: In function 'void loop()': C:\Users\80967\Desktop\HLSCL\Broadcast\WritePos.ino:13:6: error: redefinition of 'void loop()' void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:12:6: note: 'void loop()' previously defined here void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\WritePos.ino:16:3: error: 'hlscl' was not declared in this scope hlscl.WritePosEx(1, 4095, 60, 50, 500); ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\WriteSpe.ino: At global scope: C:\Users\80967\Desktop\HLSCL\Broadcast\WriteSpe.ino:3:1: error: 'HLSCL' does not name a type; did you mean 'SCSCL'? HLSCL hlscl; ^~~~~ SCSCL C:\Users\80967\Desktop\HLSCL\Broadcast\WriteSpe.ino: In function 'void setup()': C:\Users\80967\Desktop\HLSCL\Broadcast\WriteSpe.ino:5:6: error: redefinition of 'void setup()' void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:4:6: note: 'void setup()' previously defined here void setup() ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\WriteSpe.ino:9:3: error: 'hlscl' was not declared in this scope hlscl.pSerial = &Serial1; ^~~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\WriteSpe.ino: In function 'void loop()': C:\Users\80967\Desktop\HLSCL\Broadcast\WriteSpe.ino:14:6: error: redefinition of 'void loop()' void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\Broadcast.ino:12:6: note: 'void loop()' previously defined here void loop() ^~~~ C:\Users\80967\Desktop\HLSCL\Broadcast\WriteSpe.ino:17:3: error: 'hlscl' was not declared in this scope hlscl.WriteSpe(1, 60, 50, 500); ^~~~~ exit status 1 Compilation error: 'hlscl' was not declared in this scope
最新发布
08-09
../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1132): warning: #47-D: incompatible redefinition of macro "__PKHBT" (declared at line 852 of "../Drivers/CMSIS/Include/cmsis_armcc.h") #define __PKHBT(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0x0000FFFF) | \ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1134): warning: #47-D: incompatible redefinition of macro "__PKHTB" (declared at line 855 of "../Drivers/CMSIS/Include/cmsis_armcc.h") #define __PKHTB(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0xFFFF0000) | \ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1735): error: #79: expected a type specifier __STATIC_FORCEINLINE int32_t __SMMLA( ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1735): error: #101: "int32_t" has already been declared in the current scope __STATIC_FORCEINLINE int32_t __SMMLA( ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1735): error: #141-D: unnamed prototyped parameters not allowed when body is present __STATIC_FORCEINLINE int32_t __SMMLA( ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1740): error: #20: identifier "sum" is undefined return (sum + (int32_t) (((int64_t) x * y) >> 32)); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1740): error: #20: identifier "x" is undefined return (sum + (int32_t) (((int64_t) x * y) >> 32)); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1740): error: #20: identifier "y" is undefined return (sum + (int32_t) (((int64_t) x * y) >> 32)); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(2680): error: #757: function "int32_t" is not a type name int32_t shift, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(2695): error: #757: function "int32_t" is not a type name int32_t shift, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(2793): error: #757: function "int32_t" is not a type name int32_t resetStateFlag); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(2811): error: #757: function "int32_t" is not a type name int32_t resetStateFlag); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(2830): error: #757: function "int32_t" is not a type name int32_t resetStateFlag); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5532): error: #757: function "int32_t" is not a type name int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5545): error: #757: function "int32_t" is not a type name int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5558): error: #757: function "int32_t" is not a type name int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5571): error: #757: function "int32_t" is not a type name int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5606): error: #757: function "int32_t" is not a type name int32_t * pTapDelay, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5642): error: #757: function "int32_t" is not a type name int32_t * pTapDelay, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5680): error: #757: function "int32_t" is not a type name int32_t * pTapDelay, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5718): error: #757: function "int32_t" is not a type name int32_t * pTapDelay, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6491): warning: #174-D: expression has no effect int32_t i; /* Index variable */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6491): error: #65: expected a ";" int32_t i; /* Index variable */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6495): error: #20: identifier "i" is undefined i = (int32_t) ((x - S->x1) / xSpacing); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6548): warning: #174-D: expression has no effect int32_t index; /* Index to read nearest output values */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6548): error: #65: expected a ";" int32_t index; /* Index to read nearest output values */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6553): error: #20: identifier "index" is undefined index = ((x & (q31_t)0xFFF00000) >> 20); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6606): warning: #174-D: expression has no effect int32_t index; /* Index to read nearest output values */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6606): error: #65: expected a ";" int32_t index; /* Index to read nearest output values */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6611): error: #20: identifier "index" is undefined index = ((x & (int32_t)0xFFF00000) >> 20); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6611): error: #31: expression must have integral type index = ((x & (int32_t)0xFFF00000) >> 20); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6611): error: #18: expected a ")" index = ((x & (int32_t)0xFFF00000) >> 20); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6911): error: #757: function "int32_t" is not a type name int32_t * circBuffer, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6912): error: #757: function "int32_t" is not a type name int32_t L, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6914): error: #757: function "int32_t" is not a type name int32_t bufferInc, ..\User\modules\master_process.c: 5 warnings, 30 errors
06-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值