主题中讨论的其他器件:SysConfig
您好
有人可以提示我如何处理这个未解析的变量错误吗?
我正在尝试根据 Resource Explorer 中的"Hello_world.cpp"示例构建 C++应用程序。 我现在想添加 TCP 功能、并对一个简单的服务器进行编程。
因此、我正在使用 LWIP 堆栈、也可以在"enet_cpsw_tcpserver_am263x-lp_r5fss0-0_freertos_ti-arm-clang"示例中使用。 我复制了 SysConfig 1:1。
由于这个未解析的变量 EnetApp_driverOpen(),我的 C++类无法编译。 不管这个对象是在 SysConfig 中构建的、我的/Debug/syscgf 文件夹中都有一个"ti_enet_open_close.o"文件。
只要注释掉带有"EnatApp_driverOpen"的行、My Network 类就会看起来如下图所示、并在进行编译。
#pragma once #include <stdio.h> #include <stdarg.h> #include <string.h> #include "FreeRTOS.h" #include "task.h" /* lwIP core includes */ #include "lwip/opt.h" #include "lwip/sys.h" #include "lwip/tcpip.h" #include "lwip/dhcp.h" #include <networking/enet/utils/include/enet_apputils.h> #include <networking/enet/utils/include/enet_board.h> #include "ti_board_config.h" #include "ti_drivers_open_close.h" #include "ti_enet_config.h" #include "ti_enet_open_close.h" #include "app_cpswconfighandler.h" #include "ti_enet_lwipif.h" class Network { public: Network() = default; virtual ~Network() = default; int init() { Enet_Type enetType; uint32_t instId; EnetApp_getEnetInstInfo(&enetType, &instId); EnetAppUtils_enableClocks(enetType, instId); const int32_t status = EnetApp_driverOpen(enetType, instId); return 1; } };
我也不确定是否必须使用 cplusplus 标志重新编译整个库?
感谢您的支持!
克里斯