several functions show "was not declared in the scope." Really confused.

when i start to compile my code, it shows several errors:

H:\姣曡鍐呭\RFID\Arduino鍏ラ棬寰堢畝鍗曟簮浠g爜\C5_5_3\jixieshoubiTX\jixieshoubiTX.ino:58:0: warning: "F" redefined

In file included from G:\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:231:0,

from sketch\jixieshoubiTX.ino.cpp:1:

G:\Arduino\hardware\arduino\avr\cores\arduino/WString.h:38:0: note: this is the location of the previous definition

#define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))

^

H:\姣曡鍐呭\RFID\Arduino鍏ラ棬寰堢畝鍗曟簮浠g爜\C5_5_3\jixieshoubiTX\jixieshoubiTX.ino: In function 'void setup()':

jixieshoubiTX:81: error: 'init_nrf24l01' was not declared in this scope

jixieshoubiTX:82: error: 'SPI_Read' was not declared in this scope

jixieshoubiTX:86: error: 'TX_Mode' was not declared in this scope

H:\姣曡鍐呭\RFID\Arduino鍏ラ棬寰堢畝鍗曟簮浠g爜\C5_5_3\jixieshoubiTX\jixieshoubiTX.ino: In function 'void loop()':

jixieshoubiTX:97: error: 'TX_DATA' was not declared in this scope

H:\姣曡鍐呭\RFID\Arduino鍏ラ棬寰堢畝鍗曟簮浠g爜\C5_5_3\jixieshoubiTX\jixieshoubiTX.ino: In function 'void RX_DATA()':

jixieshoubiTX:110: error: 'SPI_Read' was not declared in this scope

jixieshoubiTX:113: error: 'SPI_Read_Buf' was not declared in this scope

jixieshoubiTX:114: error: 'SPI_RW_Reg' was not declared in this scope

jixieshoubiTX:116: error: 'SPI_RW_Reg' was not declared in this scope

exit status 1
'init_nrf24l01' was not declared in this scope

How can i solve it ? QAQ

jixieshoubiTX.ino (5.78 KB)

BTW My Arduino IDE version is 1.6.12

i still remember it happened to me the same problem in the past, and i put the function which i make in the front of "void setup" it works.But I don't know what the real reason for this error.

The code you posted, is that all of it? I loaded it into 1.8.0 and it complied without errors.

There was a bug in arduino-builder that prevented automatic function prototype generation when the sketch path name contains non-ASCII characters. This was fixed in version 1.8.0.