1

我尝试为 VxWorks 创建应用程序,它只会使用 tftp 获取文件。但是链接器不知道 tftpInit() 函数是什么。这些是错误示例:

dld: warning: Undefined symbol 'tftpPeerSet' in file 'lava-test/NonDebug/Objects/lava-test/lava-tests.o'
dld: warning: Undefined symbol 'tftpModeSet' in file 'lava-test/NonDebug/Objects/lava-test/lava-tests.o'
dld: warning: Undefined symbol 'tftpInit' in file 'lava-test/NonDebug/Objects/lava-test/lava-tests.o'
dld: warning: Undefined symbol 'tftpGet' in file 'lava-test/NonDebug/Objects/lava-test/lava-tests.o'
dld: warning: Undefined symbol 'tftpQuit' in file 'lava-test/NonDebug/Objects/lava-test/lava-tests.o'

在包含vxcoreip库(应该实现 tftpInit 的地方)之后,我得到了下一个链接器错误:

dld: warning: Undefined symbol '__ctype' in file 'inetAddrLib.o(C:/WindRiver/vxworks-6.9/target/lib/arm/ARMARCH7/common\libvxcoreip.a)'
dld: warning: Undefined symbol 'iosDrvInstall' in file 'sockLib.o(C:/WindRiver/vxworks-6.9/target/lib/arm/ARMARCH7/common\libvxcoreip.a)'
dld: warning: Undefined symbol 'iosFdDrvValue' in file 'sockLib.o(C:/WindRiver/vxworks-6.9/target/lib/arm/ARMARCH7/common\libvxcoreip.a)'
dld: warning: Undefined symbol 'iosMaxFiles' in file 'sockLib.o(C:/WindRiver/vxworks-6.9/target/lib/arm/ARMARCH7/common\libvxcoreip.a)'
dld: warning: Undefined symbol 'iosFdNew' in file 'sockLib.o(C:/WindRiver/vxworks-6.9/target/lib/arm/ARMARCH7/common\libvxcoreip.a)'

请建议如何链接 tftpLib。需要哪些库?

PS 项目类型 - RTP (VxWorks 6.9)。开发环境 - Workbench 3.3

4

1 回答 1

0

确保您的“vxworks 映像项目”包含 TFTP 客户端组件。

vxprj component list | grep TFTP

并添加任何缺失的:

vxprj component add INCLUDE_TFTP_CLIENT
vxprj component add INCLUDE_IPTFTPC
vxprj component add INCLUDE_IPTFTP_CLIENT_COMMAND
于 2018-10-03T14:53:41.520 回答