问题
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