mg_set_uri_callback was not declared in this scope
<pre><code>#include &lt;iostream&gt;
#include "mongoose/mongoose.h"

static void show_users(struct mg_connection *conn,
                const struct mg_request_info *request_info,
                void *user_data) {
        mg_printf(conn, "%s", "HTTP/1.1 200 OK\r\n");
        mg_printf(conn, "%s", "Content-Type: text/html\r\n\r\n");
        mg_printf(conn, "%s", "&lt;html&gt;&lt;body&gt;");
        mg_printf(conn, "%s", "&lt;h1&gt;Hi. This is a wildcard uri handler"
            "for the URI /users/*/ &lt;/h1&gt;");
        mg_printf(conn, "&lt;h2&gt;URI: %s&lt;/h2&gt;&lt;/body&gt;&lt;/html&gt;", request_info-&gt;uri);
}

static void *callback(enum mg_event event,
                      struct mg_connection *conn,
                      const struct mg_request_info *request_info) {
  if (event == MG_NEW_REQUEST) {
    char content[1024];
    int content_length = snprintf(content, sizeof(content),
                                  "Hello from mongoose! Remote port: %d",
                                  request_info-&gt;remote_port);
    mg_printf(conn,
              "HTTP/1.1 200 OK\r\n"
              "Content-Type: text/plain\r\n"
              "Content-Length: %d\r\n"        // Always set Content-Length
              "\r\n"
              "%s",
              content_length, content);
    // Mark as processed
    return content;
  } else {
    return NULL;
  }
}



int main(int argc, char * argv[])
{

    struct mg_context *ctx;
      const char *options[] = {"listening_ports", "8080", NULL};

      ctx = mg_start(&amp;callback, NULL, options);
      mg_set_uri_callback(ctx, "/users/*/", &amp;show_users, NULL);

      getchar();  // Wait until user hits "enter"
      mg_stop(ctx);

      return 0;

}
</code></pre>

<p>Why am I getting the following compile error?</p>

<blockquote>
  <p>‘mg_set_uri_callback’ was not declared in this scope</p>
</blockquote>

<p>but it's been declared way at the top. I read that it has something to do with parameters not being passed in the method?</p>

<p>Also why does the callback is a pointer method and show_users is not?</p>
