cgi_index.c compiler error HTTPD_CGI_LINK_STRUCT

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

cgi_index.c compiler error HTTPD_CGI_LINK_STRUCT

跳至解决方案
1,567 次查看
Curro
Contributor III

I'm new in MQX and i'm trying to compile TWR-K60N512_Quick_Start_Demo example but I find 8 errors, one for each line of this struct:

const HTTPD_CGI_LINK_STRUCT cgi_lnk_tbl[] = {

  { "accel_data",   cgi_accelerometer_data},

  { "rtcdata",      cgi_rtc_data},

  { "board_status", cgi_board_status},

  { "game_status",  cgi_game_status},

  { "toggleled1",     cgi_toggle_led1},

  { "toggleled2",     cgi_toggle_led2},

  { "toggleled3",     cgi_toggle_led3},

  { "toggleled4",     cgi_toggle_led4},

{ 0, 0 }    // DO NOT REMOVE - last item - end of table};

Error is:

Error[Pe144]: a value of type "int (*)(struct httpd_session_struct *)" cannot be used to initialize an entity of type "long (*)(struct httpd_session_struct *)"

I use IAR 6 and MQX 3.7.0

 

Many thanks 

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,126 次查看
madifazio
Contributor III

Hello

 

Try to set the return value of cgi functions to _mqx_int instead or int.

 

regards.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,127 次查看
madifazio
Contributor III

Hello

 

Try to set the return value of cgi functions to _mqx_int instead or int.

 

regards.

0 项奖励
回复
1,126 次查看
Curro
Contributor III

It was still _mqx_int and changing to int now runs.

Thanks a lot and regards

Corrado Carini

Gei Srl

0 项奖励
回复