Skip to content

Installing and using libhttpserver on FreeBSD 12.2

Pavel Kirichenko edited this page Jan 20, 2021 · 1 revision

Prepare

cd /usr/ports/www/libmicrohttpd
sudo make config install clean

Install libhttpserver

git clone https://github.com/etr/libhttpserver.git
cd ./libhttpserver
./bootstrap
mkdir ./build
cd ./build
../configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
gmake
sudo gmake install (optional)

Usage

Code

#include <httpserver.hpp>

Makefile

CC 		:= g++
CFLAGS 	        := -I/usr/local/include -L/usr/local/lib -g
OBJECTS 	:=
LIBRARIES 	:= -lhttpserver

.PHONY: all clean

all: minimal_https

minimal_https: 
    $(CC) $(CFLAGS) -o minimal_https minimal_https.cpp $(LIBRARIES)
	
clean:
    rm -f *.o

Compile

make
Clone this wiki locally
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy