poco-libraries

How to add Poco library in Visual Studio 2010?

我只是一个虾纸丫 提交于 2019-12-28 12:34:27
问题 It's been a while since I've programmed in C++ and right now I'm struggling with this Poco library I'm trying to add to do some HTTP requests. First of all, where do I add poco files, somewhere in my project perhaps? Secondly, I've read something about command prompt and running a script that will compile files but I have to give it an argument which is my visual studio version and the choices are from 70 to 110. How do I find out which one I should use? If someone could provide me a step-by

How to add Poco library in Visual Studio 2010?

為{幸葍}努か 提交于 2019-12-28 12:33:26
问题 It's been a while since I've programmed in C++ and right now I'm struggling with this Poco library I'm trying to add to do some HTTP requests. First of all, where do I add poco files, somewhere in my project perhaps? Secondly, I've read something about command prompt and running a script that will compile files but I have to give it an argument which is my visual studio version and the choices are from 70 to 110. How do I find out which one I should use? If someone could provide me a step-by

POCO C++ - NET SSL - how to POST HTTPS request

瘦欲@ 提交于 2019-12-28 12:00:38
问题 How to correctly do a POST to HTTPS server and embed the login data correctly. Below code does not return any cookies (in Wininet it does). I wonder how POCO HTTP library handles HTTP redirections? MyApp() { try { const Poco::URI uri( "https://localhost.com" ); const Poco::Net::Context::Ptr context( new Poco::Net::Context( Poco::Net::Context::CLIENT_USE, "", "", "rootcert.pem" ) ); Poco::Net::HTTPSClientSession session(uri.getHost(), uri.getPort(), context ); Poco::Net::HTTPRequest req(Poco:

POCO C++ - NET SSL - how to POST HTTPS request

你离开我真会死。 提交于 2019-12-28 12:00:26
问题 How to correctly do a POST to HTTPS server and embed the login data correctly. Below code does not return any cookies (in Wininet it does). I wonder how POCO HTTP library handles HTTP redirections? MyApp() { try { const Poco::URI uri( "https://localhost.com" ); const Poco::Net::Context::Ptr context( new Poco::Net::Context( Poco::Net::Context::CLIENT_USE, "", "", "rootcert.pem" ) ); Poco::Net::HTTPSClientSession session(uri.getHost(), uri.getPort(), context ); Poco::Net::HTTPRequest req(Poco:

Poco Iterating Nested JSON Objects

青春壹個敷衍的年華 提交于 2019-12-25 08:59:33
问题 I have a JSON with nested objects (here is a made up example as the real json is bigger and complex). I need to Iterate through siblings object. I know how to do it with array but could not find any example to deal with such nested object (of any nesting depth). Any idea is appreciated. { ....... "siblings":{ "Michael":{ "age":20, "lives":"Dodoma" }, "Polyasi":{ "age":25, "lives":"Geita" }, "Kiah":{ "age":3, "lives":"Dar es Salaam" } } ........... } 回答1: So I found that ValueMap::Iterator

Error Using Statically Linked Poco Library on OS X 10.10: HTTP Address Family not supported

泪湿孤枕 提交于 2019-12-25 02:57:19
问题 I am using POCO library 1.6.0 on OS X 10.10 and XCode 6.1.1 for building a mac application. I have compiled it for static linking using the following configuration: ./configure --omit=Data/ODBC,MonoDB,Data/MySQL,Data/SQLite --config=Darwin64-clang-libc++ --static This results in successful compilation and produces .a files. I have linked the libraries in XCode under linked frameworks and libraries. The app runs successfully. Questions: However on execution of Poco::Net::HTTPRequest to http:/

Poco ODBC library undefined reference error

大兔子大兔子 提交于 2019-12-25 00:18:03
问题 I am in process to build a program that establish connectivity with MySQL database using ODBC. I am using Poco-Data-ODBC library for the same. I am getting the following error : D:\Hardware\Windows\PocoODBC/PocoODBC.cpp:27: undefined reference to `__imp__ZN4Poco4Data4ODBC9Connector17registerConnectorEv' D:\Hardware\Windows\PocoODBC/PocoODBC.cpp:34: undefined reference to `__imp__ZN4Poco4Data4ODBC9Connector19unregisterConnectorEv' D:\Hardware\Windows\PocoODBC/PocoODBC.cpp:41: undefined

Http upload with progress info, in C++ (Poco/Boost)

家住魔仙堡 提交于 2019-12-24 08:35:44
问题 I'm trying to upload a big file to my http server. And i need to show a upload progress. How can i get HOW MANY BYTES are sent during the upload? Need send events to my GUI. In poco, i don't know where to put the callback. _session.sendRequest(_request) _session.receiveResponse(_response) Any ideas? or links, Thanks!! 回答1: This was 'partially' discussed in 08. Ironically I am looking for exactly the same thing. http://sourceforge.net/mailarchive/message.php?msg_id=20619477 EDIT: 02/14/12 This

Linking error with Poco Net

偶尔善良 提交于 2019-12-22 10:43:41
问题 I am stuck trying to get some code to build using the POCO libraries. I get the following when I try to build Undefined symbols for architecture x86_64: "Poco::Net::SocketAddress::SocketAddress(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned short)", referenced from: ..... ld: symbol(s) not found for architecture x86_64 Now here is the catch: I am linking with -lPocoFoundation -lPocoNet -lPocoUtil What am I missing? (I should say that I

The difference between parsing using a string or a stream (Poco c++)

吃可爱长大的小学妹 提交于 2019-12-21 21:27:37
问题 I have written a simple hierarchical json-parser, using POCO JSON, to be used as a sax parser. Is their any difference in the result if i use a string or a stream as input to the parse method, see call below, or are the different constructors equivalent? Parser parser; DefaultHandler handler; parser.setHandler(&handler); parser.parse(input); In terms of memory consumption, speed etc? 回答1: std::string version is just a wrapper that creates stream on your behalf, so at the end the total will be