1
我試圖做出簡單的網絡服務器,所以如果我搜索我的瀏覽器並輸入我的設備的IP地址,我看到一個網頁。我發現this維客頁面lwip網絡服務器(Cortex M3,Stellaris LM3S6965評估板)
我已經按照步驟操作,但是在創建時出錯。
我有包括鏈接的文件夾"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什麼樣子:
這裏距離是源文件網絡服務器:download
這裏是我的main.c,在線270上,我調用了httpd_init(); Download
你需要展示更多的代碼,也許也是makefile或者你正在構建它。儘管如此,這裏的邊界太大/具體可以回答。 – unwind
我編輯了它,但我也認爲makefile生成要顯示的文件。但我可以在哪裏更改,以便顯示我輸入的HTML頁面。 – Sharpless512
編譯器告訴你它不知道'struct's是什麼樣子,因爲它們的定義在你的數組所在的代碼中是不可見的。可能你需要「包含」更多的東西。 – Spudd86