2016-03-24 16 views
2

crash ++ 38 kullanarak FreeBSD 10.2 RELEASE ürününe silikon web sunucusu hello world example derlemeyi deniyorum. Çerçeve C++ 14 kullanır. Libmicrohttpd'yi kurdum. BenSilikon web sunucusunu libmicrohttpd backend ile bağlama

clang++38 -O2 -Wall -std=c++14 -I/usr/local/include -L/usr/local/lib -lmicrohttpd -o sws01 sws01.cpp 

Ben hatayı

In file included from sws01.cpp:2: 
/usr/local/include/silicon/backends/mhd.hh:158:22: error: use of undeclared identifier 'MHD_http_unescape' 
    value.resize(MHD_http_unescape(&value[0])); 

sws01.cpp olsun kullanarak programı derlemeye çalıştığınızda

:

#include <silicon/api.hh> 
#include <silicon/backends/mhd.hh> 
#include "symbols.hpp" 

using namespace sl; 
using namespace s; 

auto hello_api = http_api(
     GET/_hello = [](){ return D(_message = "Hello from Silicon Webserver!"); } 
); 

int main() { 
    sl::mhd_json_serve(hello_api, 9876); 
} 

Bu SO thread cevabı uygulamaya çalıştığı -Wl ve gibibelirtme Ya da çalışmadı ya da ().

xcode kullanarak os x üzerinde çalışmalar 7.3.

cevap

2

FreeBSD bağlantı noktası sistemi ile birlikte gelen libmicrohttpd sunucusunu kapatır. 0.9.37 ve libmicrohttpd.so MHD_http_unescape() işlevine sahip değil ancak libmicrohttpd.a yok. En yenisi şu anda 0.9,48. Port-version'u bununla değiştirmek derleme sorunumu çözüyor.

İlgili konular