That is the same. The name of a function decays into a pointer to that function in just the same way as the name of an array decays into a pointer to the first element. The only exception is if the function name is the argument of the address-of operator. So “AcceptPolicyCallback“ and “&AcceptPolicyCallback“ have the same value and the same type.
Pretty sure that is true in both C and C++. Von: libmicrohttpd [mailto:[email protected]] Im Auftrag von silvioprog Gesendet: Dienstag, 12. April 2016 16:37 An: libmicrohttpd development and user mailinglist <[email protected]> Betreff: Re: [libmicrohttpd] libmicrohttpd 0.9.49 released It worked fine here on Windows. I don't know how C++ declares pointers, but looking at this line: struct MHD_Daemon *daemon = MHD_start_daemon( daemon_flags, 0, http_AcceptPolicyCallback, NULL, http_AccessHandlerCallback, NULL, ... You should use something like this: struct MHD_Daemon *daemon = MHD_start_daemon( daemon_flags, 0, &http_AcceptPolicyCallback, NULL, &http_AccessHandlerCallback, NULL, ... Try the "A minimal example" available at MHD home page: https://www.gnu.org/software/libmicrohttpd/ . On Tue, Apr 12, 2016 at 11:10 AM, Markus Doppelbauer <[email protected]<mailto:[email protected]>> wrote: Hello, Thanks a lot. For me, 0.9.49 does not work - it never enters the "AccessHandlerCallback()" handler. I have attached a small testcase. Steps to reproduce: g++ -o testmhd test.cpp -I/tmp/libmicrohttpd-0.9.49/src/include/ -L/tmp/libmicrohttpd-0.9.49/src/microhttpd/.libs/ -lmicrohttpd LD_LIBRARY_PATH=/tmp/libmicrohttpd-0.9.49/src/microhttpd/.libs/ ./testmhd wget -O /dev/null 127.0.0.1:8080<http://127.0.0.1:8080> -- Silvio Clécio
