提高的触摸库,直接打开工程可以这个编译通过。
将库文件和头文件放在自己的工程下,主函数调用库文件函数,提示没有定义。
尝试了将头文件放在INC下面,库文件发在StdPeriphDriver下面,也没有用。
然后新建CH573工程,新建可以编译。随后将库文件和头文件添加到新建工程, 在新建的mian.c中调用库文件内函数,提示没有定义。
疑问,为什么提供的工程可以。我的工程和新建的工程都不行。 需要哪里设置吗?
下面是新建后,只增加了库文件和头文件,然后替换了main.C的内容。编译结果。
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 func
tion `main':
FLASH: 3420 B 448 KB 0.75%
D:工程CBB建设TOUCHCH573Fobj/../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建设TOUCHCH573Fobj/../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建设TOUCHCH573Fobj/../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建设TOUCHCH573Fobj/../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建设TOUCHCH573Fobj/../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建设TOUCHCH573Fobj/../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)