Steward
分享是一種喜悅、更是一種幸福
掌機 - TRIMUI SMART - 解決Undefined reference to __aeabi_idiv問題
參考資訊:
https://stackoverflow.com/questions/28331521/how-do-i-link-the-correct-library-so-aeabi-idiv-and-aeabi-idivmod-work
問題如下:
arm-linux-gnueabihf-ld: dram.c:(.text+0x5a): undefined reference to `__aeabi_idiv' arm-linux-gnueabihf-ld: dram.c:(.text+0x8c): undefined reference to `__aeabi_idiv' arm-linux-gnueabihf-ld: dram.c:(.text+0x96): undefined reference to `__aeabi_uidiv'
解法如下:
(在Link階段加上libgcc.a):$(shell arm-linux-gnueabihf-gcc -print-libgcc-file-name)