cgi_index.c compiler error HTTPD_CGI_LINK_STRUCT

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

cgi_index.c compiler error HTTPD_CGI_LINK_STRUCT

ソリューションへジャンプ
1,570件の閲覧回数
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,129件の閲覧回数
madifazio
Contributor III

Hello

 

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

 

regards.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,130件の閲覧回数
madifazio
Contributor III

Hello

 

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

 

regards.

0 件の賞賛
返信
1,129件の閲覧回数
Curro
Contributor III

It was still _mqx_int and changing to int now runs.

Thanks a lot and regards

Corrado Carini

Gei Srl

0 件の賞賛
返信