単純なWebサーバーを作成しようとしているので、ブラウザーで検索してデバイスのIPを入力すると、Webページが表示されます。このwikiページを見つけました
手順に従いましたが、ビルド中にエラーが発生しました。
"C:\stellarisware\third_party\lwip-1.3.2\apps\httpserver_raw"
httpd.cなどのファイルを取得するためのリンクされたフォルダが含まれています
追加しましhttpd_init()
たが、ビルド中にこのエラーが発生します。
[cc] C:\stellarisware\third_party\lwip-1.3.2\apps\httpserver_raw\fsdata.c:328:26: error: array type has incomplete element type
[cc] C:\stellarisware\third_party\lwip-1.3.2\apps\httpserver_raw\fsdata.c:330:26: error: array type has incomplete element type
[cc] C:\stellarisware\third_party\lwip-1.3.2\apps\httpserver_raw\fsdata.c:332:26: error: array type has incomplete element type
私がそのファイルを見ると、これはその中にあります:
const struct fsdata_file file_img_sics_gif[] = {{NULL, data_img_sics_gif, data_img_sics_gif + 14, sizeof(data_img_sics_gif) - 14}};
const struct fsdata_file file_404_html[] = {{file_img_sics_gif, data_404_html, data_404_html + 10, sizeof(data_404_html) - 10}};
const struct fsdata_file file_index_html[] = {{file_404_html, data_index_html, data_index_html + 12, sizeof(data_index_html) - 12}};
これは私のdirがどのように見えるかです:
Webサーバーからのソースファイルは次のとおりです。ダウンロード
これが私のmain.cです。270行目でhttpd_init()を呼び出しました。ダウンロード