提高的觸摸庫,直接打開工程可以這個編譯通過。
將庫文件和頭文件放在自己的工程下,主函數(shù)調(diào)用庫文件函數(shù),提示沒有定義。?
嘗試了將頭文件放在INC下面,庫文件發(fā)在StdPeriphDriver下面,也沒有用。
然后新建CH573工程,新建可以編譯。隨后將庫文件和頭文件添加到新建工程, 在新建的mian.c中調(diào)用庫文件內(nèi)函數(shù),提示沒有定義。??
疑問,為什么提供的工程可以。我的工程和新建的工程都不行。? 需要哪里設置嗎?
下面是新建后,只增加了庫文件和頭文件,然后替換了main.C的內(nèi)容。編譯結(jié)果。
c:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./src/Main.o: in function `main':
? ? ? ? ? ?FLASH:? ? ? ? 3420 B? ? ? ?448 KB? ? ? 0.75%
D:\工程\CBB建設\TOUCH\CH573F\obj/../src/Main.c:159: undefined reference to `TKY_BaseInit'
c:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\工程\CBB建設\TOUCH\CH573F\obj/../src/Main.c:165: undefined reference to `TKY_GetCurChannelMean'
c:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\工程\CBB建設\TOUCH\CH573F\obj/../src/Main.c:168: undefined reference to `TKY_CHInit'
c:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\工程\CBB建設\TOUCH\CH573F\obj/../src/Main.c:177: undefined reference to `TKY_GetCurChannelMean'
c:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\工程\CBB建設\TOUCH\CH573F\obj/../src/Main.c:179: undefined reference to `TKY_CHInit'
c:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\工程\CBB建設\TOUCH\CH573F\obj/../src/Main.c:193: undefined reference to `TKY_PollForFilterMode_1_2'
collect2.exe: error: ld returned 1 exit status
? ? ? ? ? ? ?RAM:? ? ? ? 2092 B? ? ? ? 18 KB? ? ?11.35%
make: *** [makefile:54: CH573F.elf] Error 1
16:02:16 Build Failed. 8 errors, 0 warnings. (took 25s.680ms)