arturoc / ofxhttpserver Goto Github PK
View Code? Open in Web Editor NEWhttp server openframeworks addon based on libmicrohttpd
http server openframeworks addon based on libmicrohttpd
I see that you change in your last commit
5560dd5
the way of registering events handler.
but in the example, the syntax is still using
ofAddListener(server->getEvent,this,&testApp::getRequest);
I tryied to use a kind of
server->setListener(getRequest(response));
but it's wrong. what is the exact syntax ?
thanks
The embedded libmicrohttpd server throws a bunch of errors for me:
Ld bin/buttCancerDebug.app/Contents/MacOS/buttCancerDebug normal i386
cd /Users/jedahan/Dropbox/code/jedahan/openFrameworks/apps/myApps/buttCancer
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -L/Users/jedahan/Dropbox/code/jedahan/openFrameworks/apps/myApps/buttCancer/bin -F/Users/jedahan/Dropbox/code/jedahan/openFrameworks/apps/myApps/buttCancer/bin -F/Users/jedahan/Dropbox/code/jedahan/openFrameworks/apps/myApps/buttCancer/../../../libs/glut/lib/osx -filelist /Users/jedahan/Library/Developer/Xcode/DerivedData/buttCancer-bmguzlpjlvbkooapdgvrepxbxubw/Build/Intermediates/buttCancer.build/Debug/buttCancer.build/Objects-normal/i386/buttCancerDebug.LinkFileList -dead_strip ../../../libs/poco/lib/osx/PocoCrypto.a ../../../libs/poco/lib/osx/PocoData.a ../../../libs/poco/lib/osx/PocoDataODBC.a ../../../libs/poco/lib/osx/PocoDataSQLite.a ../../../libs/poco/lib/osx/PocoFoundation.a ../../../libs/poco/lib/osx/PocoNet.a ../../../libs/poco/lib/osx/PocoNetSSL.a ../../../libs/poco/lib/osx/PocoUtil.a ../../../libs/poco/lib/osx/PocoXML.a ../../../libs/poco/lib/osx/PocoZip.a ../../../libs/tess2/lib/osx/tess2.a ../../../libs/glew/lib/osx/glew.a ../../../libs/cairo/lib/osx/cairo-script-interpreter.a ../../../libs/cairo/lib/osx/cairo.a ../../../libs/cairo/lib/osx/pixman-1.a ../../../libs/fmodex/lib/osx/libfmodex.dylib ../../../libs/rtAudio/lib/osx/rtAudio.a ../../../libs/openssl/lib/osx/crypto.a ../../../libs/openssl/lib/osx/ssl.a ../../../libs/glfw/lib/osx/libglfw3.a ../../../addons/ofxOpenCv/libs/opencv/lib/osx/opencv.a -stdlib=libstdc++ -framework Accelerate -framework QTKit -framework GLUT /Users/jedahan/Dropbox/code/jedahan/openFrameworks/libs/openFrameworksCompiled/lib/osx/openFrameworksDebug.a -framework AGL -framework ApplicationServices -framework AudioToolbox -framework Carbon -framework CoreAudio -framework CoreFoundation -framework CoreServices -framework OpenGL -framework QuickTime -framework AppKit -framework Cocoa -framework IOKit -framework CoreVideo -Xlinker -dependency_info -Xlinker /Users/jedahan/Library/Developer/Xcode/DerivedData/buttCancer-bmguzlpjlvbkooapdgvrepxbxubw/Build/Intermediates/buttCancer.build/Debug/buttCancer.build/Objects-normal/i386/buttCancerDebug_dependency_info.dat -o /Users/jedahan/Dropbox/code/jedahan/openFrameworks/apps/myApps/buttCancer/bin/buttCancerDebug.app/Contents/MacOS/buttCancerDebug
Undefined symbols for architecture i386:
"_MHD_start_daemon", referenced from:
ofxHTTPServer::start(unsigned int, bool) in ofxHTTPServer.o
"_MHD_get_connection_values", referenced from:
ofxHTTPServer::answer_to_connection(void*, MHD_Connection*, char const*, char const*, char const*, char const*, unsigned long*, void**) in ofxHTTPServer.o
"_MHD_set_connection_value", referenced from:
ofxHTTPServer::answer_to_connection(void*, MHD_Connection*, char const*, char const*, char const*, char const*, unsigned long*, void**) in ofxHTTPServer.o
"_MHD_lookup_connection_value", referenced from:
ofxHTTPServer::answer_to_connection(void*, MHD_Connection*, char const*, char const*, char const*, char const*, unsigned long*, void**) in ofxHTTPServer.o
"_MHD_create_post_processor", referenced from:
ofxHTTPServer::answer_to_connection(void*, MHD_Connection*, char const*, char const*, char const*, char const*, unsigned long*, void**) in ofxHTTPServer.o
"_MHD_add_response_header", referenced from:
ofxHTTPServer::send_page(MHD_Connection*, long, char const*, int, std::string) in ofxHTTPServer.o
ofxHTTPServer::send_redirect(MHD_Connection*, char const*, int) in ofxHTTPServer.o
"_MHD_create_response_from_data", referenced from:
ofxHTTPServer::send_page(MHD_Connection*, long, char const*, int, std::string) in ofxHTTPServer.o
ofxHTTPServer::send_redirect(MHD_Connection*, char const*, int) in ofxHTTPServer.o
"_MHD_queue_response", referenced from:
ofxHTTPServer::send_page(MHD_Connection*, long, char const*, int, std::string) in ofxHTTPServer.o
ofxHTTPServer::send_redirect(MHD_Connection*, char const*, int) in ofxHTTPServer.o
"_MHD_destroy_response", referenced from:
ofxHTTPServer::send_page(MHD_Connection*, long, char const*, int, std::string) in ofxHTTPServer.o
ofxHTTPServer::send_redirect(MHD_Connection*, char const*, int) in ofxHTTPServer.o
"_MHD_post_process", referenced from:
ofxHTTPServer::answer_to_connection(void*, MHD_Connection*, char const*, char const*, char const*, char const*, unsigned long*, void**) in ofxHTTPServer.o
"_MHD_destroy_post_processor", referenced from:
ofxHTTPServer::request_completed(void*, MHD_Connection*, void**, MHD_RequestTerminationCode) in ofxHTTPServer.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
When I try to manually add libmicrohttpd.a, the linked ignores it, citing:
ld: warning: ignoring file /Users/jedahan/Dropbox/code/jedahan/openFrameworks/addons/ofxHttpServer/libs/microhttpd/lib/macosx/libmicrohttpd.a, file was built for archive which is not the architecture being linked (i386): /Users/jedahan/Dropbox/code/jedahan/openFrameworks/addons/ofxHttpServer/libs/microhttpd/lib/macosx/libmicrohttpd.a
Is there a way to tell the compiler to link against x86_64?
Hello
I try tu compile the example under ofx0.10.1 / ubuntu 18.04 64bits
I've an error :
ServerExample/src/ofApp.cpp:17:27: error: no matching function for call to ‘ofxHTTPServer::setListener(ofApp&)’
server->setListener(*this);
^
In file included from /home/cedric/soft/of_v0.10.1_linux64gcc6_release/apps/myApps/ServerExample/src/ofApp.h:4:0,
from /home/cedric/soft/of_v0.10.1_linux64gcc6_release/apps/myApps/ServerExample/src/ofApp.cpp:1:
/home/cedric/soft/of_v0.10.1_linux64gcc6_release/addons/ofxHttpServer/src/ofxHTTPServer.h:74:7: note: candidate: void ofxHTTPServer::setListener(ofxHTTPServerListener&)
void setListener(ofxHTTPServerListener & listener);
^~~~~~~~~~~
/home/cedric/soft/of_v0.10.1_linux64gcc6_release/addons/ofxHttpServer/src/ofxHTTPServer.h:74:7: note: no known conversion for argument 1 from ‘ofApp’ to ‘ofxHTTPServerListener&’
is it possible to fix it ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.