cgi_index.c compiler error HTTPD_CGI_LINK_STRUCT

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

cgi_index.c compiler error HTTPD_CGI_LINK_STRUCT

Jump to solution
1,109 Views
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 

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
668 Views
madifazio
Contributor III

Hello

 

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

 

regards.

View solution in original post

0 Kudos
Reply
2 Replies
669 Views
madifazio
Contributor III

Hello

 

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

 

regards.

0 Kudos
Reply
668 Views
Curro
Contributor III

It was still _mqx_int and changing to int now runs.

Thanks a lot and regards

Corrado Carini

Gei Srl

0 Kudos
Reply