Mongoose has no mg_create_server function?

会有一股神秘感。 提交于 2019-12-12 03:23:04

问题


I'm following the Mongoose Embedding Guide and I get the error:

error: ‘mg_create_server’ was not declared in this scope
     struct mg_server *server = mg_create_server(NULL, NULL);

This is copied verbatim from the embedding guide.

Looking in mongoose.h, there is no mg_create_server anywhere to be found! Neither in that latest version, nor 5.1, nor 4.1 (from the google code archives).

What am I missing here?


回答1:


mg_create_server apparently exists in version 5.6. Version 6.0 (the latest) has changed the API, and they didn't update their embedding guide. Here is an example of a RESTful server with the latest version of Mongoose. Here are the latest API docs.



来源:https://stackoverflow.com/questions/32956469/mongoose-has-no-mg-create-server-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!