我想編譯其他人寫的arduino的polargraph代碼。據我所知,代碼本身是正確的,並添加了運行它所需的庫後,我收到此錯誤消息。你如何在arduino代碼中做前向聲明?
polargraph_server_polarshield.ino:109:16: error: 'prog_uint32_t' does not name a type
In file included from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/Arduino.h:28:0, from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/SPI/SPI.h:17, from polargraph_server_polarshield.ino:47:
util.ino: In function 'long unsigned int crc_update(long unsigned int, byte)':
util.ino:392:31: error: 'crc_table' was not declared in this scope
util.ino:394:31: error: 'crc_table' was not declared in this scope
Error compiling.
我聽說你需要建立一個向前聲明,因爲它使用兩個詞在其數據類型和官方的Arduino編譯器不處理那麼好。我該如何去做呢?
它會去哪裏? – LinkReincarnate
@LinkReincarnate:只有您可以回答這個問題,這是您的前瞻性聲明。你需要它的地方! –