ch32v307芯片,添加tcp server报的错,已经添加wchnet库和路径

18:21:08 **** Incremental Build of configuration obj for project light3_net ****

make -j6 all 

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./User/tcpServer.o: in function `WCHNET_DataLoopback':

D:\work\2023\24_light3_net\obj/../User/tcpServer.c:56: undefined reference to `SocketInf'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\work\2023\24_light3_net\obj/../User/tcpServer.c:56: undefined reference to `SocketInf'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./User/tcpServer.o: in function `loop_tcp_server_system':

D:\work\2023\24_light3_net\obj/../User/tcpServer.c:164: undefined reference to `WCHNET_MainTask'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\work\2023\24_light3_net\NetLib\libwchnet.a(socket.o): in function `tcp_recved_socket':

socket.c:(.text.tcp_recved_socket+0xe): undefined reference to `LocalTime'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: socket.c:(.text.tcp_recved_socket+0x16): undefined reference to `LocalTime'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\work\2023\24_light3_net\NetLib\libwchnet.a(socket.o): in function `WCHNET_ModifyRecvBuf':

socket.c:(.text.WCHNET_ModifyRecvBuf+0x10): undefined reference to `SocketInf'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: socket.c:(.text.WCHNET_ModifyRecvBuf+0x14): undefined reference to `SocketInf'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\work\2023\24_light3_net\NetLib\libwchnet.a(socket.o): in function `WCHNET_SocketRecv':

socket.c:(.text.WCHNET_SocketRecv+0xc): undefined reference to `SocketInf'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: socket.c:(.text.WCHNET_SocketRecv+0x10): undefined reference to `SocketInf'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: socket.c:(.text.WCHNET_SocketRecv+0x3c): undefined reference to `SocketInf'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\work\2023\24_light3_net\NetLib\libwchnet.a(socket.o):socket.c:(.text.SocketIPRawSend+0x1a): more undefined references to `SocketInf' follow

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\work\2023\24_light3_net\NetLib\libwchnet.a(tcp_out.o): in function `tcp_send_empty_ack':

tcp_out.c:(.text.tcp_send_empty_ack+0x60): undefined reference to `LocalTime'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: tcp_out.c:(.text.tcp_send_empty_ack+0x64): undefined reference to `LocalTime'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\work\2023\24_light3_net\NetLib\libwchnet.a(tcp_out.o): in function `.L88':

tcp_out.c:(.text.tcp_output+0x7a): undefined reference to `LocalTime'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\work\2023\24_light3_net\NetLib\libwchnet.a(tcp_out.o): in function `.L102':

tcp_out.c:(.text.tcp_output+0x24a): undefined reference to `LocalTime'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\work\2023\24_light3_net\NetLib\libwchnet.a(eth_api.o): in function `setRxBuffAddr':

eth_api.c:(.text.setRxBuffAddr+0x0): undefined reference to `pDMARxSet'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: eth_api.c:(.text.setRxBuffAddr+0x4): undefined reference to `pDMARxSet'

e:/software/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: eth_api.c:(.text.setRxBuffAddr+0x10): undefined reference to `pDMARxSet'

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:56: light3_net.elf] Error 1


wch.png

还有这个看起来也不正常,netlib 文件夹和下面的文件 图标都带有斜杠,例子tcp server只有libwchnet_flag.a带斜杠。


您好,需右键netlib文件夹通过Include from build将其添加编译

image.png


谢谢,问题已解决


只有登录才能回复,可以选择微信账号登录