What should be the reason for getting undeclared identifier error for RTCS_FD_ZERO and RTCS_FD_SET?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

What should be the reason for getting undeclared identifier error for RTCS_FD_ZERO and RTCS_FD_SET?

1,303 次查看
omkardixit
Contributor III

Hi

I'm working on the TCP on the TWR-K70F120m and using MQX RTOS 4.1.0. So basically I was working on some protocol in which I wanted to use select() function. To do the same I have written a small code as follows.

 

RTCS_FD_ZERO(&rfds);
RTCS_FD_SET(sock,&rfds);

_RTCS_select(sock+1,&read_fds,NULL,NULL,0); //sleep here

 

The problem is, I'm getting "USE OF UNDECLARED IDENTIFIER" error for the RTCS_FD_ZERO and RTCS_FD_SET. How can i remove this error. Also I have added the following header files

#include <mqx.h>
#include <bsp.h>
#include <rtcs.h>
#include <enet.h>
#include <ipcfg.h>
#include "config.h"

is anything missed here. Any help will be really appreciated!!

Regards,

Omkar

 

0 项奖励
回复
1 回复

1,275 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi @omkardixit :

 

RTCS_FD_SET, RTCS_FD_ZERO are defined in sock_select.c.

Please check whether this file is in your project?

danielchen_0-1622723783241.png

 

make clean all and try it again.

Regards

Daniel

 

0 项奖励
回复