Hi Folks,
I am testing out the library on Ubuntu 16.04, and am running into the
error below when attempting to compile the demo app from here:
https://www.gnu.org/software/libmicrohttpd/. Am I missing something
in the configuration?
# gcc -o microhttp microhttp.c -L/usr/local/lib/* -I/usr/local/include
/tmp/cc7sUAvI.o: In function `ahc_echo':
microhttp.c:(.text+0xa5): undefined reference to
`MHD_create_response_from_buffer'
microhttp.c:(.text+0xbe): undefined reference to `MHD_queue_response'
microhttp.c:(.text+0xcd): undefined reference to `MHD_destroy_response'
/tmp/cc7sUAvI.o: In function `main':
microhttp.c:(.text+0x14a): undefined reference to `MHD_start_daemon'
microhttp.c:(.text+0x17b): undefined reference to `MHD_stop_daemon'
collect2: error: ld returned 1 exit status
Here is the output from the config.log:
# cat config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GNU Libmicrohttpd configure 0.9.59, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure
## - ##
## Platform. ##
## - ##
hostname = ubuntu-xenial
uname -m = x86_64
uname -r = 4.4.0-127-generic
uname -s = Linux
uname -v = #153-Ubuntu SMP Sat May 19 10:58:46 UTC 2018
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /home/vagrant/bin
PATH: /home/vagrant/.local/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /snap/bin
## --- ##
## Core tests. ##
## --- ##
configure:2644: checking for a BSD-compatible install
configure:2712: result: /usr/bin/install -c
configure:2723: checking whether build environment is sane
configure:2778: result: yes
configure:2929: checking for a thread-safe mkdir -p
configure:2968: result: /bin/mkdir -p
configure:2975: checking for gawk
configure:2991: found /usr/bin/gawk
configure:3002: result: gawk
configure:3013: checking whether make sets $(MAKE)
configure:3035: result: yes
configure:3064: checking whether make supports nested variables
configure:3081: result: yes
configure:3218: checking whether z/OS special settings are required
configure:3241: result: no
configure:3250: checking for gawk
configure:3277: result: gawk
configure:3289: checking whether ln -s works
configure:3293: result: yes
configure:3300: checking whether make sets $(MAKE)
configure:3322: result: yes
configure:3335: checking build system type
configure:3349: result: x86_64-pc-linux-gnu
configure:3369: checking host system type
configure:3382: result: x86_64-pc-linux-gnu
configure:3414: checking for style of include used by make
configure:3442: result: GNU
configure:3513: checking for gcc
configure:3529: found /usr/bin/gcc
configure:3540: result: gcc
configure:3769: checking for C compiler version
configure:3778: gcc --version >&5
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3789: $? = 0
configure:3778: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
5.4.0-6ubuntu1~16.04.10'
--with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++
--prefix=/usr --program-suffix=-5 --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre
--enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64
--with-arch-directory=amd64
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc
--enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)
configure:3789: $? = 0
configure:3778: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no inpu