cppcms-users Mailing List for CppCMS C++ Web Framework (Page 59)
Brought to you by:
artyom-beilis
You can subscribe to this list here.
| 2009 |
Jan
|
Feb
(22) |
Mar
|
Apr
(3) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
(16) |
Dec
(13) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(4) |
Feb
|
Mar
(8) |
Apr
(8) |
May
(8) |
Jun
(36) |
Jul
(63) |
Aug
(126) |
Sep
(47) |
Oct
(66) |
Nov
(46) |
Dec
(42) |
| 2011 |
Jan
(87) |
Feb
(24) |
Mar
(54) |
Apr
(21) |
May
(22) |
Jun
(18) |
Jul
(22) |
Aug
(101) |
Sep
(57) |
Oct
(33) |
Nov
(34) |
Dec
(66) |
| 2012 |
Jan
(64) |
Feb
(76) |
Mar
(73) |
Apr
(105) |
May
(93) |
Jun
(83) |
Jul
(84) |
Aug
(88) |
Sep
(57) |
Oct
(59) |
Nov
(35) |
Dec
(49) |
| 2013 |
Jan
(67) |
Feb
(17) |
Mar
(49) |
Apr
(64) |
May
(87) |
Jun
(64) |
Jul
(93) |
Aug
(23) |
Sep
(15) |
Oct
(16) |
Nov
(62) |
Dec
(73) |
| 2014 |
Jan
(5) |
Feb
(23) |
Mar
(21) |
Apr
(11) |
May
(1) |
Jun
(19) |
Jul
(27) |
Aug
(16) |
Sep
(5) |
Oct
(37) |
Nov
(12) |
Dec
(9) |
| 2015 |
Jan
(7) |
Feb
(7) |
Mar
(44) |
Apr
(28) |
May
(5) |
Jun
(12) |
Jul
(8) |
Aug
|
Sep
(39) |
Oct
(34) |
Nov
(30) |
Dec
(34) |
| 2016 |
Jan
(66) |
Feb
(23) |
Mar
(33) |
Apr
(15) |
May
(11) |
Jun
(15) |
Jul
(26) |
Aug
(4) |
Sep
(1) |
Oct
(30) |
Nov
(10) |
Dec
|
| 2017 |
Jan
(52) |
Feb
(9) |
Mar
(24) |
Apr
(16) |
May
(9) |
Jun
(12) |
Jul
(33) |
Aug
(8) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
(6) |
| 2018 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(14) |
Jun
(1) |
Jul
(9) |
Aug
(1) |
Sep
(13) |
Oct
(8) |
Nov
(2) |
Dec
(2) |
| 2019 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(9) |
Jul
(6) |
Aug
(25) |
Sep
(10) |
Oct
(10) |
Nov
(6) |
Dec
|
| 2021 |
Jan
|
Feb
|
Mar
(7) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(9) |
Oct
(1) |
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
|
From: Shiv S. D. <shi...@gm...> - 2013-04-18 17:03:17
|
And one more thing. I did not give a statement. It was a suggestion. To you. If you are taken back by suggestions then good luck learning new things. On Thu, Apr 18, 2013 at 10:30 PM, Shiv Shankar Dayal < shi...@gm...> wrote: > I understand your point. It is expected of a programmer to read the > documentation. > I could read the docs and convert the regexes for lightty to nginx. These > are simple > things. > > Before posting a question one must try and do research and post his > research. > > As far as answering question is concerned I have not been using CppCMS for > last > six months and I do not check mail regularly. But since you said it is sad > it hit me. > > Last point open source is bad term and it does not run by community. Hop > over to > libreprogramming.org and see logo and understand the logo to see why free > software > succeeds. It succeeds because of less than 1% people. Artyom being one of > them. > > I am merely a user. I have nothing to take credit for even if I answer all > questions. > It is due to Artyom this project exists and will exist. Someday there will > be another > maintainer and it is because of that person the project succeeds. > > Patch senders contribution is nothing compared to core architect. And > users are well > users. > > For more information read "Free as in freedom". Learn the history. > > Artyom, > > I am sorry if I am discouraging a potential user in any sense. > > > On Thu, Apr 18, 2013 at 10:20 PM, Saikumar Gandapodi <sai...@gm... > > wrote: > >> Wow, I am taken aback by that statement. >> >> One should realize that not all documentations are perfect and people's >> comprehension on a subject might vary upon reading a document. >> >> I understand people have a busy life and all have priorities. >> But where were you guys when the question was posted ? >> If the question was that stupid, why dont you politely point us to the >> required document ? >> Is there anything wrong in that? >> >> Also where in the document does it explain that you cannot have the root >> of a >> domain assigned to a function. >> Maybe it did, but I could have missed it or didn't understand it. >> So instead of making comments like this you could have helped us out. >> >> The author and the commenter should understand that the success of an >> Open Source package lies on the fact on how well the community supports >> it. >> >> >> >> >> ------------------------------------------------------------------------------ >> Precog is a next-generation analytics platform capable of advanced >> analytics on semi-structured data. The platform includes APIs for building >> apps and a phenomenal toolset for data science. Developers can use >> our toolset for easy data analysis & visualization. Get a free account! >> http://www2.precog.com/precogplatform/slashdotnewsletter >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > > > -- > Best regards, > Shiv Shankar Dayal > -- Best regards, Shiv Shankar Dayal |
|
From: Shiv S. D. <shi...@gm...> - 2013-04-18 17:01:06
|
I understand your point. It is expected of a programmer to read the documentation. I could read the docs and convert the regexes for lightty to nginx. These are simple things. Before posting a question one must try and do research and post his research. As far as answering question is concerned I have not been using CppCMS for last six months and I do not check mail regularly. But since you said it is sad it hit me. Last point open source is bad term and it does not run by community. Hop over to libreprogramming.org and see logo and understand the logo to see why free software succeeds. It succeeds because of less than 1% people. Artyom being one of them. I am merely a user. I have nothing to take credit for even if I answer all questions. It is due to Artyom this project exists and will exist. Someday there will be another maintainer and it is because of that person the project succeeds. Patch senders contribution is nothing compared to core architect. And users are well users. For more information read "Free as in freedom". Learn the history. Artyom, I am sorry if I am discouraging a potential user in any sense. On Thu, Apr 18, 2013 at 10:20 PM, Saikumar Gandapodi <sai...@gm...>wrote: > Wow, I am taken aback by that statement. > > One should realize that not all documentations are perfect and people's > comprehension on a subject might vary upon reading a document. > > I understand people have a busy life and all have priorities. > But where were you guys when the question was posted ? > If the question was that stupid, why dont you politely point us to the > required document ? > Is there anything wrong in that? > > Also where in the document does it explain that you cannot have the root > of a > domain assigned to a function. > Maybe it did, but I could have missed it or didn't understand it. > So instead of making comments like this you could have helped us out. > > The author and the commenter should understand that the success of an > Open Source package lies on the fact on how well the community supports it. > > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Best regards, Shiv Shankar Dayal |
|
From: Saikumar G. <sai...@gm...> - 2013-04-18 16:50:32
|
Wow, I am taken aback by that statement. One should realize that not all documentations are perfect and people's comprehension on a subject might vary upon reading a document. I understand people have a busy life and all have priorities. But where were you guys when the question was posted ? If the question was that stupid, why dont you politely point us to the required document ? Is there anything wrong in that? Also where in the document does it explain that you cannot have the root of a domain assigned to a function. Maybe it did, but I could have missed it or didn't understand it. So instead of making comments like this you could have helped us out. The author and the commenter should understand that the success of an Open Source package lies on the fact on how well the community supports it. |
|
From: Shiv S. D. <shi...@gm...> - 2013-04-18 16:16:56
|
Before blaming the community one should read the documentation if I may say so. :-) On Thu, Apr 18, 2013 at 5:40 PM, Artyom Beilis <art...@ya...> wrote: > Such questions were asked quite lot over the list: > > In any case, there is a full manual about how to do what you need: > > http://cppcms.com/wikipp/en/page/run_application_web_server_root > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------ > *From:* Saikumar Gandapodi <sai...@gm...> > *To:* cpp...@li... > *Sent:* Thursday, April 18, 2013 3:07 PM > *Subject:* Re: [Cppcms-users] Dispatcher and URL Mapping > > Bump!. > Its so sad that such an EXCELLENT Framework has no support from the > user community. > > Anyway, I figured myself with this issue. > > For the benefit of others, I did the following. > I stopped using lighttpd to forward all requests as a proxy server to > cppcms app. > Instead I forwarded only the path meant for cppcms as the documentation > suggested. > Which means, the default page of the root of domain which not be handled > by the cppcms. > > Thanks Guys. > > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- Best regards, Shiv Shankar Dayal |
|
From: Artyom B. <art...@ya...> - 2013-04-18 12:10:55
|
Such questions were asked quite lot over the list: In any case, there is a full manual about how to do what you need: http://cppcms.com/wikipp/en/page/run_application_web_server_root Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Saikumar Gandapodi <sai...@gm...> >To: cpp...@li... >Sent: Thursday, April 18, 2013 3:07 PM >Subject: Re: [Cppcms-users] Dispatcher and URL Mapping > > >Bump!. >Its so sad that such an EXCELLENT Framework has no support from the >user community. > >Anyway, I figured myself with this issue. > >For the benefit of others, I did the following. >I stopped using lighttpd to forward all requests as a proxy server to >cppcms app. >Instead I forwarded only the path meant for cppcms as the documentation >suggested. >Which means, the default page of the root of domain which not be handled >by the cppcms. > >Thanks Guys. > > > >------------------------------------------------------------------------------ >Precog is a next-generation analytics platform capable of advanced >analytics on semi-structured data. The platform includes APIs for building >apps and a phenomenal toolset for data science. Developers can use >our toolset for easy data analysis & visualization. Get a free account! >http://www2.precog.com/precogplatform/slashdotnewsletter >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
|
From: Saikumar G. <sai...@gm...> - 2013-04-18 12:08:14
|
Bump!. Its so sad that such an EXCELLENT Framework has no support from the user community. Anyway, I figured myself with this issue. For the benefit of others, I did the following. I stopped using lighttpd to forward all requests as a proxy server to cppcms app. Instead I forwarded only the path meant for cppcms as the documentation suggested. Which means, the default page of the root of domain which not be handled by the cppcms. Thanks Guys. |
|
From: Sab <rim...@gm...> - 2013-04-15 12:23:55
|
Using the internal web server sounds actually like a good idea. I'm already using libcurl in my project so this combination could be an easy solution. Until now I only used the fcgi interface and the dispathcer of CppCMS so I have no experience yet about the server. Can you discribe in some words (or point me to example/tutorial), what the simplest way would be to set up the internal webserver for my unit tests? Sab |
|
From: Saikumar G. <sai...@gm...> - 2013-04-15 04:06:00
|
Also, I have included the fileserver in the config.js
"file_server" : {
"enable": true,
"document_root" : ".",
"alias" : [
{ "url" : "/images" , "path" : "/home/admin/dev/images" },
{ "url" : "/css" , "path" : "/home/admin/dev/css" }
]
}
|
|
From: Saikumar G. <sai...@gm...> - 2013-04-15 02:50:14
|
I don't seem to get this working. Can someone please help me with this ? I trying to map the following paths to methods. I can get to the default "/" rootpage() only, however the login and auth page is not accessible. Getting a 404 error for these two pages. www.domain.com -> rootpage() www.domain.com/login -> loginpage() www.domain.com/auth -> authpage() for this I made the following in the config.js and in the code { "service" : { "api" : "http", "port" : 8080 }, "http" : { "script" : "/" } } { dispatcher().assign("/auth", &server::authpage, this); mapper().assign("auth", "/auth"); dispatcher().assign("/login", &server::loginpage, this); mapper().assign("login", "/login"); dispatcher().assign("", &server::rootpage, this); mapper().assign(""); mapper().root(""); } I am running lighttpd as a proxy server connecting to the cppcms app as http. lighttpd: $HTTP["host"] =~ "(www.domain.com)" { proxy.server = ("" => ( ("host" => "127.0.0.1", "port" => 8080) )) What am I missing ? Thanks. |
|
From: Artyom B. <art...@ya...> - 2013-04-12 12:09:05
|
Unfortunately there is no such a feature you require. On the other hand using internal HTTP web server would allow you to use any HTTP client (libcurl from C++ for example) or any other language. For example significant part CppCMS unit tests are written in Python using urllib (IIRC). Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Sab <rim...@gm...> >To: cpp...@li... >Sent: Friday, April 12, 2013 12:31 PM >Subject: [Cppcms-users] UnitTest > > >Hi Artyom, > >I would like to create a UnitTest for my REST-WebHandler classes. Thus, I >would like to separately test these classes, without a running webserver and >back engine. So I would like to simulate an incoming CppCMS request(), somehow >fill header and body with simulated info, pass it to my processing function >and then read the content of the response() without trying to send it back to >the server to check if the result is as expected. > >Any ideas, where I could start? > >Sab > > >------------------------------------------------------------------------------ >Precog is a next-generation analytics platform capable of advanced >analytics on semi-structured data. The platform includes APIs for building >apps and a phenomenal toolset for data science. Developers can use >our toolset for easy data analysis & visualization. Get a free account! >http://www2.precog.com/precogplatform/slashdotnewsletter >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
|
From: Sab <rim...@gm...> - 2013-04-12 09:31:51
|
Hi Artyom, I would like to create a UnitTest for my REST-WebHandler classes. Thus, I would like to separately test these classes, without a running webserver and back engine. So I would like to simulate an incoming CppCMS request(), somehow fill header and body with simulated info, pass it to my processing function and then read the content of the response() without trying to send it back to the server to check if the result is as expected. Any ideas, where I could start? Sab |
|
From: Sergey <dan...@gm...> - 2013-04-06 19:11:24
|
Artyom Beilis <artyomtnk@...> writes: > > > Actually I think I need to add a good tutorial about it. Good idea. |
|
From: Artyom B. <art...@ya...> - 2013-04-04 19:45:12
|
----- Original Message ----- > From: Markus Raab <us...@ma...> > To: cpp...@li... > Cc: > Sent: Thursday, April 4, 2013 9:52 PM > Subject: [Cppcms-users] booster roadmap > > Hello Artyom! > > Is it always safe to use boost::bind together with cppcms? > If yes, I do not exactly understand why Yes, it is safe, cppcms does not use anything in boost namespace and any binder would work fine std::bind, boost::bind or anything else. > "Extract/Reimplement boost::bind in Booster." > is on the roadmap, even though boost::bind is obsoleted by std::bind anyway? > I don't think it would actually be implemented with C++11 lambdas the boost::bind is quite absolete. > Have you ever asked on the boost mailing list if they want to have an > "official" stable boost release branch? Maybe more people would > contribute > to it. > Ohhhhhh If it was the case I would not start booster in first place > Actually I think booster is a good idea and I am sure some/many people > inside boost think that too. Only some boost libraries have problems with > continous API/ABI breakage, most do not (although mainly because they do not > change at all). It requires forking Boost and maintaining it and supporting it. Also it requires many changes. For example booster::shared_ptr supports both atomic operations (if not avalible) and mutexes using the same ABI, all the code is havily "pimpl"-ed and having "d" pointers for extensions, using as few inline code as possible. > > Additionally I would be interested how the C++11 roadmap is. I think on a > platform providing e.g. std::shared_ptr, booster::shared_ptr should not be > used anymore. Do you have or plan some macros to switch between them? > CppCMS currently targets C++03 compatible compilers, more than that C++11 and C++03 compiled modes are ABI/API compatible, so I can't switch using a macro between std::shared_ptr and booster::shared_ptr. Some future version (that is not planned yet) would explore fully C++11 including stuff like rvalue references and many things in standard library but at this point were many users still use older compilers I can't do it. > best regards > Markus > Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
|
From: Artyom B. <art...@ya...> - 2013-04-04 19:22:27
|
Actually I think I need to add a good tutorial about it. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Markus Raab <us...@ma...> >To: cpp...@li... >Sent: Thursday, April 4, 2013 9:37 PM >Subject: Re: [Cppcms-users] SSE keep-alive > >Hello! > >Artyom Beilis wrote: >> I don't really understand why do you have mutex... >> >> You may not write to the event stream from a thread that is not the event >> loop thread. >> >> If you want to notify the asynchronous SSE on anything you need to use >> cppcms::service::post() with a callback that would be executed in the >> event loop. > >It would be a good idea to say that clearly on the very top of >http://cppcms.com/cppcms_ref/latest/classcppcms_1_1http_1_1context.html >http://cppcms.com/cppcms_ref/latest/classcppcms_1_1http_1_1response.html >(it would be the best if you use \warning or \note to make the pitfall more >visible) > >It is otherwise not obvious that this limitation exists. > >best regards >Markus > > >------------------------------------------------------------------------------ >Minimize network downtime and maximize team effectiveness. >Reduce network management and security costs.Learn how to hire >the most talented Cisco Certified professionals. Visit the >Employer Resources Portal >http://www.cisco.com/web/learning/employer_resources/index.html >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
|
From: Markus R. <us...@ma...> - 2013-04-04 18:52:49
|
Hello Artyom! Is it always safe to use boost::bind together with cppcms? If yes, I do not exactly understand why "Extract/Reimplement boost::bind in Booster." is on the roadmap, even though boost::bind is obsoleted by std::bind anyway? Have you ever asked on the boost mailing list if they want to have an "official" stable boost release branch? Maybe more people would contribute to it. Actually I think booster is a good idea and I am sure some/many people inside boost think that too. Only some boost libraries have problems with continous API/ABI breakage, most do not (although mainly because they do not change at all). Additionally I would be interested how the C++11 roadmap is. I think on a platform providing e.g. std::shared_ptr, booster::shared_ptr should not be used anymore. Do you have or plan some macros to switch between them? best regards Markus |
|
From: Markus R. <us...@ma...> - 2013-04-04 18:37:31
|
Hello! Artyom Beilis wrote: > I don't really understand why do you have mutex... > > You may not write to the event stream from a thread that is not the event > loop thread. > > If you want to notify the asynchronous SSE on anything you need to use > cppcms::service::post() with a callback that would be executed in the > event loop. It would be a good idea to say that clearly on the very top of http://cppcms.com/cppcms_ref/latest/classcppcms_1_1http_1_1context.html http://cppcms.com/cppcms_ref/latest/classcppcms_1_1http_1_1response.html (it would be the best if you use \warning or \note to make the pitfall more visible) It is otherwise not obvious that this limitation exists. best regards Markus |
|
From: Artyom B. <art...@ya...> - 2013-04-04 06:25:29
|
Hello, first of all take a look on this: http://cppcms.com/wikipp/en/page/notes_for_windows_users#Building.and.using.CppCMS.under.Visual.Studio When you are building CppCMS using VS you need to use nmake files rather than create VS project. VS projects are not supported. Tell if you still have problems Also make sure that prce/zlib and cppcms are build with correct release debug versions. i.e. Build Release version of CppCMS with Release versions of zlib/pcre and the other way around - use debug build of zlib/prce with debug build of CppCMS. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: ssss <hua...@ho...> >To: "cpp...@li..." <cpp...@li...> >Sent: Thursday, April 4, 2013 1:32 AM >Subject: [Cppcms-users] Need Help!!!! > > > >Hi, > > >I am trying to start to use cppcms to develop a web-based system. I have downloaded cppcms 1.0.3 and I also use zlib 1.2.7 and pcre 8.32. I am under windows system and using visual studio 2012 and cmake 2.8.10. > > >I am trying to compile the cppcms library for 32bit. I start from compiling the zlib and pcre (release) without any problem. But I have been fighting with compiling the cppcms for one day without any progress. So I have to turn to the mail list to look for help!!!!! > > >What I have done is: > > >I go to the cppcms folder and use the command > > >F:\cmake-2.8.10.2\bin\cmake -G"Visual Studio 11" -DCMAKE_INCLUDE_PATH=Z:\pcre\include;Z:\libzlib-v\include -DCMAKE_LIBRARY_PATH=z:\pcre\lib;Z:\libzlib-v\lib -DCMAKE_INSTALL_PREFIX=Z:\libcppcms -DCMAKE_BUILD_TYPE=Release > > >The VS project is generated without any problem. I can open the VS solution, named as cppcms.sln. There are 77 projects generated. Then I start to build the solution, BUT I always get the errors (error LNK2019: unresolved external symbol) at the end of this email. Finally I can see the static files, booster.lib, cppcms.lib, etc. But no DLL files are compiled. > > >Someone has asked very similar question in http://stackoverflow.com/questions/12657186/cppcms-lots-of-unresolved-external-symbols. But I can not find any answer. > > >I am sure the zlib and pcre is no problem. > > >Thanks for your help so that I can get rid of this boring, even angering task and start to enjoy the web development. > > >Best wishes, > > >Ying > > > > > > > > > > >Here is part of the output of VS building and the full building output is attached with this email: > > >3> Creating library Z:/cppcms-1.0.3/booster/Release/booster.lib and object Z:/cppcms-1.0.3/booster/Release/booster.exp >4> booster-static.vcxproj -> Z:\cppcms-1.0.3\booster\Release\libbooster.lib >3>endpoint.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "public: __thiscall booster::aio::endpoint::endpoint(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0endpoint@aio@booster@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) >3>endpoint.obj : error LNK2019: unresolved external symbol __imp__inet_addr@4 referenced in function "public: __thiscall booster::aio::endpoint::endpoint(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0endpoint@aio@booster@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) >3>endpoint.obj : error LNK2019: unresolved external symbol __imp__ntohs@4 referenced in function "public: int __thiscall booster::aio::endpoint::port(void)const " (?port@endpoint@aio@booster@@QBEHXZ) >3>reactor.obj : error LNK2019: unresolved external symbol __imp__select@20 referenced in function "public: virtual int __thiscall booster::aio::w32_select_reactor::poll(struct booster::aio::reactor::event *,int,int,int &)" (?poll@w32_select_reactor@aio@booster@@UAEHPAUevent@reactor@23@HHAAH@Z) >3>reactor.obj : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function "public: __thiscall booster::aio::`anonymous namespace'::loader::loader(void)" (??0loader@?A0x48b22409@aio@booster@@QAE@XZ) >3>acceptor.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0 >3>stream_socket.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0 >3>reactor.obj : error LNK2019: unresolved external symbol __imp__WSAGetLastError@0 referenced in function "public: virtual int __thiscall booster::aio::w32_select_reactor::poll(struct booster::aio::reactor::event *,int,int,int &)" (?poll@w32_select_reactor@aio@booster@@UAEHPAUevent@reactor@23@HHAAH@Z) >3>select_iterrupter.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0 >3>basic_io_device.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0 >3>basic_socket.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0 >3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__accept@12 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ) >3>acceptor.obj : error LNK2001: unresolved external symbol __imp__accept@12 >3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__bind@12 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ) >3>acceptor.obj : error LNK2001: unresolved external symbol __imp__bind@12 >3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "public: __thiscall booster::aio::impl::select_interrupter::~select_interrupter(void)" (??1select_interrupter@impl@aio@booster@@QAE@XZ) >3>basic_io_device.obj : error LNK2001: unresolved external symbol __imp__closesocket@4 >3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__connect@12 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ) >3>stream_socket.obj : error LNK2001: unresolved external symbol __imp__connect@12 >3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__ioctlsocket@12 referenced in function __catch$?open@select_interrupter@impl@aio@booster@@QAE_NXZ$0 >3>basic_io_device.obj : error LNK2001: unresolved external symbol __imp__ioctlsocket@12 >3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__getsockname@12 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ) >3>basic_socket.obj : error LNK2001: unresolved external symbol __imp__getsockname@12 >3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__htonl@4 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ) >3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__listen@8 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ) >3>acceptor.obj : error LNK2001: unresolved external symbol __imp__listen@8 >3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function "public: void __thiscall booster::aio::impl::select_interrupter::clean(void)" (?clean@select_interrupter@impl@aio@booster@@QAEXXZ) >3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function "public: void __thiscall booster::aio::impl::select_interrupter::notify(void)" (?notify@select_interrupter@impl@aio@booster@@QAEXXZ) >3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__setsockopt@20 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ) >3>basic_socket.obj : error LNK2001: unresolved external symbol __imp__setsockopt@20 >3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ) >3>basic_socket.obj : error LNK2001: unresolved external symbol __imp__socket@12 >3>basic_socket.obj : error LNK2019: unresolved external symbol __imp__getpeername@12 referenced in function "public: class booster::aio::endpoint __thiscall booster::aio::basic_socket::remote_endpoint(class booster::system::error_code &)" (?remote_endpoint@basic_socket@aio@booster@@QAE?AVendpoint@23@AAVerror_code@system@3@@Z) >3>basic_socket.obj : error LNK2019: unresolved external symbol __imp__getsockopt@20 referenced in function "public: bool __thiscall booster::aio::basic_socket::get_option(enum booster::aio::basic_socket::boolean_option_type,class booster::system::error_code &)" (?get_option@basic_socket@aio@booster@@QAE_NW4boolean_option_type@123@AAVerror_code@system@3@@Z) >3>stream_socket.obj : error LNK2001: unresolved external symbol __imp__getsockopt@20 >3>stream_socket.obj : error LNK2019: unresolved external symbol __imp__shutdown@8 referenced in function "public: void __thiscall booster::aio::stream_socket::shutdown(enum booster::aio::stream_socket::how_type)" (?shutdown@stream_socket@aio@booster@@QAEXW4how_type@123@@Z) >3>stream_socket.obj : error LNK2019: unresolved external symbol __imp__WSARecv@28 referenced in function "private: int __thiscall booster::aio::stream_socket::readv(class booster::aio::mutable_buffer const &)" (?readv@stream_socket@aio@booster@@AAEHABVmutable_buffer@23@@Z) >3>stream_socket.obj : error LNK2019: unresolved external symbol __imp__WSASend@28 referenced in function "private: int __thiscall booster::aio::stream_socket::writev(class booster::aio::const_buffer const &)" (?writev@stream_socket@aio@booster@@AAEHABVconst_buffer@23@@Z) >3>Z:\cppcms-1.0.3\booster\Release\booster.dll : fatal error LNK1120: 23 unresolved externals > > > > >5> Creating library Z:/cppcms-1.0.3/Release/cppcms.lib and object Z:/cppcms-1.0.3/Release/cppcms.exp >5>service.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function "public: void __thiscall cppcms::`anonymous namespace'::apache_event_handler::operator()(void)const " (??Rapache_event_handler@?A0x845b90c3@cppcms@@QBEXXZ) >5>send_timeout.obj : error LNK2019: unresolved external symbol __imp__setsockopt@20 referenced in function "void __cdecl cppcms::impl::set_send_timeout(class booster::aio::stream_socket &,int)" (?set_send_timeout@impl@cppcms@@YAXAAVstream_socket@aio@booster@@H@Z) >5>send_timeout.obj : error LNK2019: unresolved external symbol __imp__WSAGetLastError@0 referenced in function "void __cdecl cppcms::impl::set_send_timeout(class booster::aio::stream_socket &,int)" (?set_send_timeout@impl@cppcms@@YAXAAVstream_socket@aio@booster@@H@Z) >5>fastcgi_api.obj : error LNK2019: unresolved external symbol __imp__htonl@4 referenced in function "private: void __thiscall cppcms::impl::cgi::fastcgi::add_pair(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?add_pair@fastcgi@cgi@impl@cppcms@@AAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) >5>fastcgi_api.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "private: void __thiscall cppcms::impl::cgi::fastcgi::async_send_respnse(class booster::callback<void __cdecl(class booster::system::error_code const &)> const &)" (?async_send_respnse@fastcgi@cgi@impl@cppcms@@AAEXABV?$callback@$$A6AXABVerror_code@system@booster@@@Z@booster@@@Z) >5>fastcgi_api.obj : error LNK2019: unresolved external symbol __imp__ntohs@4 referenced in function "private: bool __thiscall cppcms::impl::cgi::fastcgi::non_blocking_read_record(void)" (?non_blocking_read_record@fastcgi@cgi@impl@cppcms@@AAE_NXZ) >5>Z:\cppcms-1.0.3\Release\cppcms.dll : fatal error LNK1120: 6 unresolved externals >------------------------------------------------------------------------------ >Minimize network downtime and maximize team effectiveness. >Reduce network management and security costs.Learn how to hire >the most talented Cisco Certified professionals. Visit the >Employer Resources Portal >http://www.cisco.com/web/learning/employer_resources/index.html >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
|
From: Christian G. <chr...@gm...> - 2013-04-04 06:16:37
|
2013/4/4 ssss <hua...@ho...>: > Hi, > > I am trying to start to use cppcms to develop a web-based system. I have > downloaded cppcms 1.0.3 and I also use zlib 1.2.7 and pcre 8.32. I am under > windows system and using visual studio 2012 and cmake 2.8.10. > > I am trying to compile the cppcms library for 32bit. I start from compiling > the zlib and pcre (release) without any problem. But I have been fighting > with compiling the cppcms for one day without any progress. So I have to > turn to the mail list to look for help!!!!! > > What I have done is: > > I go to the cppcms folder and use the command > > F:\cmake-2.8.10.2\bin\cmake -G"Visual Studio 11" > -DCMAKE_INCLUDE_PATH=Z:\pcre\include;Z:\libzlib-v\include > -DCMAKE_LIBRARY_PATH=z:\pcre\lib;Z:\libzlib-v\lib > -DCMAKE_INSTALL_PREFIX=Z:\libcppcms -DCMAKE_BUILD_TYPE=Release > > The VS project is generated without any problem. I can open the VS solution, > named as cppcms.sln. There are 77 projects generated. Then I start to build > the solution, BUT I always get the errors (error LNK2019: unresolved > external symbol) at the end of this email. Finally I can see the static > files, booster.lib, cppcms.lib, etc. But no DLL files are compiled. > > Someone has asked very similar question in > http://stackoverflow.com/questions/12657186/cppcms-lots-of-unresolved-external-symbols. > But I can not find any answer. > > I am sure the zlib and pcre is no problem. > > Thanks for your help so that I can get rid of this boring, even angering > task and start to enjoy the web development. > As I am not coding/compiling my cppcms stuff I am not 100% sure, but try to link against ws2_32.lib, the Winsock2 library. See http://www.installsetupconfig.com/win32programming/windowsocketwinsock214_7.html for some details. greets -- Christian Gmeiner, MSc |
|
From: ssss <hua...@ho...> - 2013-04-03 22:32:57
|
Hi, I am trying to start to use cppcms to develop a web-based system. I have downloaded cppcms 1.0.3 and I also use zlib 1.2.7 and pcre 8.32. I am under windows system and using visual studio 2012 and cmake 2.8.10. I am trying to compile the cppcms library for 32bit. I start from compiling the zlib and pcre (release) without any problem. But I have been fighting with compiling the cppcms for one day without any progress. So I have to turn to the mail list to look for help!!!!! What I have done is: I go to the cppcms folder and use the command F:\cmake-2.8.10.2\bin\cmake -G"Visual Studio 11" -DCMAKE_INCLUDE_PATH=Z:\pcre\include;Z:\libzlib-v\include -DCMAKE_LIBRARY_PATH=z:\pcre\lib;Z:\libzlib-v\lib -DCMAKE_INSTALL_PREFIX=Z:\libcppcms -DCMAKE_BUILD_TYPE=Release The VS project is generated without any problem. I can open the VS solution, named as cppcms.sln. There are 77 projects generated. Then I start to build the solution, BUT I always get the errors (error LNK2019: unresolved external symbol) at the end of this email. Finally I can see the static files, booster.lib, cppcms.lib, etc. But no DLL files are compiled. Someone has asked very similar question in http://stackoverflow.com/questions/12657186/cppcms-lots-of-unresolved-external-symbols. But I can not find any answer. I am sure the zlib and pcre is no problem. Thanks for your help so that I can get rid of this boring, even angering task and start to enjoy the web development. Best wishes, Ying Here is part of the output of VS building and the full building output is attached with this email: 3> Creating library Z:/cppcms-1.0.3/booster/Release/booster.lib and object Z:/cppcms-1.0.3/booster/Release/booster.exp4> booster-static.vcxproj -> Z:\cppcms-1.0.3\booster\Release\libbooster.lib3>endpoint.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "public: __thiscall booster::aio::endpoint::endpoint(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0endpoint@aio@booster@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)3>endpoint.obj : error LNK2019: unresolved external symbol __imp__inet_addr@4 referenced in function "public: __thiscall booster::aio::endpoint::endpoint(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0endpoint@aio@booster@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)3>endpoint.obj : error LNK2019: unresolved external symbol __imp__ntohs@4 referenced in function "public: int __thiscall booster::aio::endpoint::port(void)const " (?port@endpoint@aio@booster@@QBEHXZ)3>reactor.obj : error LNK2019: unresolved external symbol __imp__select@20 referenced in function "public: virtual int __thiscall booster::aio::w32_select_reactor::poll(struct booster::aio::reactor::event *,int,int,int &)" (?poll@w32_select_reactor@aio@booster@@UAEHPAUevent@reactor@23@HHAAH@Z)3>reactor.obj : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function "public: __thiscall booster::aio::`anonymous namespace'::loader::loader(void)" (??0loader@?A0x48b22409@aio@booster@@QAE@XZ)3>acceptor.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@03>stream_socket.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@03>reactor.obj : error LNK2019: unresolved external symbol __imp__WSAGetLastError@0 referenced in function "public: virtual int __thiscall booster::aio::w32_select_reactor::poll(struct booster::aio::reactor::event *,int,int,int &)" (?poll@w32_select_reactor@aio@booster@@UAEHPAUevent@reactor@23@HHAAH@Z)3>select_iterrupter.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@03>basic_io_device.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@03>basic_socket.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@03>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__accept@12 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ)3>acceptor.obj : error LNK2001: unresolved external symbol __imp__accept@123>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__bind@12 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ)3>acceptor.obj : error LNK2001: unresolved external symbol __imp__bind@123>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "public: __thiscall booster::aio::impl::select_interrupter::~select_interrupter(void)" (??1select_interrupter@impl@aio@booster@@QAE@XZ)3>basic_io_device.obj : error LNK2001: unresolved external symbol __imp__closesocket@43>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__connect@12 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ)3>stream_socket.obj : error LNK2001: unresolved external symbol __imp__connect@123>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__ioctlsocket@12 referenced in function __catch$?open@select_interrupter@impl@aio@booster@@QAE_NXZ$03>basic_io_device.obj : error LNK2001: unresolved external symbol __imp__ioctlsocket@123>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__getsockname@12 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ)3>basic_socket.obj : error LNK2001: unresolved external symbol __imp__getsockname@123>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__htonl@4 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ)3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__listen@8 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ)3>acceptor.obj : error LNK2001: unresolved external symbol __imp__listen@83>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function "public: void __thiscall booster::aio::impl::select_interrupter::clean(void)" (?clean@select_interrupter@impl@aio@booster@@QAEXXZ)3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function "public: void __thiscall booster::aio::impl::select_interrupter::notify(void)" (?notify@select_interrupter@impl@aio@booster@@QAEXXZ)3>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__setsockopt@20 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ)3>basic_socket.obj : error LNK2001: unresolved external symbol __imp__setsockopt@203>select_iterrupter.obj : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function "public: bool __thiscall booster::aio::impl::select_interrupter::open(void)" (?open@select_interrupter@impl@aio@booster@@QAE_NXZ)3>basic_socket.obj : error LNK2001: unresolved external symbol __imp__socket@123>basic_socket.obj : error LNK2019: unresolved external symbol __imp__getpeername@12 referenced in function "public: class booster::aio::endpoint __thiscall booster::aio::basic_socket::remote_endpoint(class booster::system::error_code &)" (?remote_endpoint@basic_socket@aio@booster@@QAE?AVendpoint@23@AAVerror_code@system@3@@Z)3>basic_socket.obj : error LNK2019: unresolved external symbol __imp__getsockopt@20 referenced in function "public: bool __thiscall booster::aio::basic_socket::get_option(enum booster::aio::basic_socket::boolean_option_type,class booster::system::error_code &)" (?get_option@basic_socket@aio@booster@@QAE_NW4boolean_option_type@123@AAVerror_code@system@3@@Z)3>stream_socket.obj : error LNK2001: unresolved external symbol __imp__getsockopt@203>stream_socket.obj : error LNK2019: unresolved external symbol __imp__shutdown@8 referenced in function "public: void __thiscall booster::aio::stream_socket::shutdown(enum booster::aio::stream_socket::how_type)" (?shutdown@stream_socket@aio@booster@@QAEXW4how_type@123@@Z)3>stream_socket.obj : error LNK2019: unresolved external symbol __imp__WSARecv@28 referenced in function "private: int __thiscall booster::aio::stream_socket::readv(class booster::aio::mutable_buffer const &)" (?readv@stream_socket@aio@booster@@AAEHABVmutable_buffer@23@@Z)3>stream_socket.obj : error LNK2019: unresolved external symbol __imp__WSASend@28 referenced in function "private: int __thiscall booster::aio::stream_socket::writev(class booster::aio::const_buffer const &)" (?writev@stream_socket@aio@booster@@AAEHABVconst_buffer@23@@Z)3>Z:\cppcms-1.0.3\booster\Release\booster.dll : fatal error LNK1120: 23 unresolved externals 5> Creating library Z:/cppcms-1.0.3/Release/cppcms.lib and object Z:/cppcms-1.0.3/Release/cppcms.exp5>service.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function "public: void __thiscall cppcms::`anonymous namespace'::apache_event_handler::operator()(void)const " (??Rapache_event_handler@?A0x845b90c3@cppcms@@QBEXXZ)5>send_timeout.obj : error LNK2019: unresolved external symbol __imp__setsockopt@20 referenced in function "void __cdecl cppcms::impl::set_send_timeout(class booster::aio::stream_socket &,int)" (?set_send_timeout@impl@cppcms@@YAXAAVstream_socket@aio@booster@@H@Z)5>send_timeout.obj : error LNK2019: unresolved external symbol __imp__WSAGetLastError@0 referenced in function "void __cdecl cppcms::impl::set_send_timeout(class booster::aio::stream_socket &,int)" (?set_send_timeout@impl@cppcms@@YAXAAVstream_socket@aio@booster@@H@Z)5>fastcgi_api.obj : error LNK2019: unresolved external symbol __imp__htonl@4 referenced in function "private: void __thiscall cppcms::impl::cgi::fastcgi::add_pair(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?add_pair@fastcgi@cgi@impl@cppcms@@AAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)5>fastcgi_api.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "private: void __thiscall cppcms::impl::cgi::fastcgi::async_send_respnse(class booster::callback<void __cdecl(class booster::system::error_code const &)> const &)" (?async_send_respnse@fastcgi@cgi@impl@cppcms@@AAEXABV?$callback@$$A6AXABVerror_code@system@booster@@@Z@booster@@@Z)5>fastcgi_api.obj : error LNK2019: unresolved external symbol __imp__ntohs@4 referenced in function "private: bool __thiscall cppcms::impl::cgi::fastcgi::non_blocking_read_record(void)" (?non_blocking_read_record@fastcgi@cgi@impl@cppcms@@AAE_NXZ)5>Z:\cppcms-1.0.3\Release\cppcms.dll : fatal error LNK1120: 6 unresolved externals |
|
From: Christian G. <chr...@gm...> - 2013-04-03 08:04:43
|
2013/4/3 Artyom Beilis <art...@ya...>:
> ----- Original Message -----
>
>> 2013/4/2 Artyom Beilis <art...@ya...>:
>>> Small notes:
>>>
>>> 1. Session is saved when the output stream is accessed first time, as you
>>> need to provide set session cookies.
>>>
>>> Remember the session data may be stored entirely on the client
>>> side in signed cookies.
>>>
>>
>> "session" : {
>> "expire" : "renew",
>> "timeout" : 15,
>> "location" : "server",
>> "gc" : 10,
>> "server": {
>> "storage":"memory"
>> }
>> },
>>
>> The session data itself is store on the server side - or?
>>
>>> Saving session after output was provided is similar to an attempt
>>> to set a cookie **after** HTTP headers were sent.
>>>
>>
>> Okay
>>
>
>>> 2. Calling changing session values and calling save after the output
>>> was generated has undefined behavior.
>>>
>>
>> I am not changing any value stored in the session. I only want to renew
>> the session. For me it is a problem when the cppcms session gets deleted
>> if a script runs e.g. 15 minutes. On the client side there is only one open
>> SSE stream.
>
>
> Why wouldn't you increase the timeout on session such that it would not expire so quickly?
> In general session is something long running - months, days, sometime hours for more sensitive
> applications and tens of minutes for very sensitive applications like banking web sites.
>
There is a requirement that the user get logged out after 10 minutes
of inactivity as the application
is sensitive.
> The primary role of session is to carry user identification and other various user
> specific properties.
>
>>
>
>>> So your code is incorrect.
>>>
>>> I think you mix up two different things: HTTP Stream session - the
>>> state where the connection is open and you push the data to the stream
>>> (it is represented by cppcms::http::context and actual open TCP/IP socket)
>>> and the CppCMS/Web session the information shared **accorss** different
>>> connections - that is based cookies - the state for stateless HTTP.
>>>
>>
>> As far as I can tell from studying the source code a cppcms::http::context gets
>> created if the client does a get/post.
>> This context has access to the request(), the response() and the assigned cppcms
>> session().
>>
>> In my case the life-time strategy is set to "renew". This means the
>> client needs to
>> do a get/post to create a cppcms::http::context as this action will
>> trigger the "renew"
>> logic - or?
>>
>> Is there a way to do the "renew" of the cppcms::session from the
>> server side?
>> Again from reading the code the cppcms::sessions::session_storage class
>> provides methods to load and save session data. The garbage logic is inside
>> such a inherited class.
>
> No, if there is no request the session would get expired, regardless garbage
> collection.
>
That is not correct... if I am using my
session_interface::renew_session() method it
will trigger a call to
void session_storage::save(std::string const &key,time_t
to,std::string const &value)
which saves the session with a updated time_t to value. As a result of
this I am able
to renew a cppcms::session for hours - did run a test over the night.
So I think this works for server side stored sessions.
The only problem I see is that the cookie 'cppcms_session' - in my
case - expires as defined.
So I can not renew it on the browser side. That would mean that the
script runs nicely but if
any get/post gets triggered the cookie is not valid any more and the
user is not logged in.
>
> GC is needed to collect expired sessions but the session expiration does not
> depend on GC, it is session specific property.
>
It is yes... but if i call load() and save() the session expiration
gets updated.
>
>>
>> If the session data is stored on the server side and the cookie in the
>> browser only stores
>> the session key it should be possible to renew a cppcms::session.
>> And this is what I doing in this code snippet.
>>
>> void session_interface::renew_session()
>> {
>> loaded_ = 0;
>> saved_ = 0;
>>
>> load();
>> save();
>> }
>>
>> If there is no way to "renew" the cppcms::session on the server side,
>> I need to
>> add some js code to the client side doing silly gets to trigger the
>> "renew" of
>> the cppcms::session.
>>
>
> I understand what you say but this is not something that is supported.
>
> You may open a feature request to provide an access to server side
> session storage from an API that is not connected to a specific
> cppcms::http::context and renew session.
>
>
> What you can actually do is to implement an alternative server side storage:
>
> http://cppcms.com/cppcms_ref/1.0.2/classcppcms_1_1sessions_1_1session__storage.html
>
I am using my own session_storage as every session gets a own 'tmp'
folder to upload and
download data. This is also I need to 'renew' the session as a script
works on data stored in
such a 'tmp' folder. It would be bad to delete files inside the 'tmp'
folder if a script runs.
>
> That would allow you to handle the timeout in different way and probably update
> the session from your application directly.
>
> But this is a hack.
>
I am not interested in hacks which can not find its way back into the
upstream project like cppcms.
So the best would be to write some JS to handle my problem. Should not
be too hard to do
a 'keep_alive' get via ajax.
Thanks a lot for your time.
greets
--
Christian Gmeiner, MSc
--
Christian Gmeiner, MSc
2013/4/3 Artyom Beilis <art...@ya...>:
> ----- Original Message -----
>
>> 2013/4/2 Artyom Beilis <art...@ya...>:
>>> Small notes:
>>>
>>> 1. Session is saved when the output stream is accessed first time, as you
>>> need to provide set session cookies.
>>>
>>> Remember the session data may be stored entirely on the client
>>> side in signed cookies.
>>>
>>
>> "session" : {
>> "expire" : "renew",
>> "timeout" : 15,
>> "location" : "server",
>> "gc" : 10,
>> "server": {
>> "storage":"memory"
>> }
>> },
>>
>> The session data itself is store on the server side - or?
>>
>>> Saving session after output was provided is similar to an attempt
>>> to set a cookie **after** HTTP headers were sent.
>>>
>>
>> Okay
>>
>
>>> 2. Calling changing session values and calling save after the output
>>> was generated has undefined behavior.
>>>
>>
>> I am not changing any value stored in the session. I only want to renew
>> the session. For me it is a problem when the cppcms session gets deleted
>> if a script runs e.g. 15 minutes. On the client side there is only one open
>> SSE stream.
>
>
> Why wouldn't you increase the timeout on session such that it would not expire so quickly?
> In general session is something long running - months, days, sometime hours for more sensitive
> applications and tens of minutes for very sensitive applications like banking web sites.
>
> The primary role of session is to carry user identification and other various user
> specific properties.
>
>>
>
>>> So your code is incorrect.
>>>
>>> I think you mix up two different things: HTTP Stream session - the
>>> state where the connection is open and you push the data to the stream
>>> (it is represented by cppcms::http::context and actual open TCP/IP socket)
>>> and the CppCMS/Web session the information shared **accorss** different
>>> connections - that is based cookies - the state for stateless HTTP.
>>>
>>
>> As far as I can tell from studying the source code a cppcms::http::context gets
>> created if the client does a get/post.
>> This context has access to the request(), the response() and the assigned cppcms
>> session().
>>
>> In my case the life-time strategy is set to "renew". This means the
>> client needs to
>> do a get/post to create a cppcms::http::context as this action will
>> trigger the "renew"
>> logic - or?
>>
>> Is there a way to do the "renew" of the cppcms::session from the
>> server side?
>> Again from reading the code the cppcms::sessions::session_storage class
>> provides methods to load and save session data. The garbage logic is inside
>> such a inherited class.
>
> No, if there is no request the session would get expired, regardless garbage
> collection.
>
> GC is needed to collect expired sessions but the session expiration does not
> depend on GC, it is session specific property.
>
>
>>
>> If the session data is stored on the server side and the cookie in the
>> browser only stores
>> the session key it should be possible to renew a cppcms::session.
>> And this is what I doing in this code snippet.
>>
>> void session_interface::renew_session()
>> {
>> loaded_ = 0;
>> saved_ = 0;
>>
>> load();
>> save();
>> }
>>
>> If there is no way to "renew" the cppcms::session on the server side,
>> I need to
>> add some js code to the client side doing silly gets to trigger the
>> "renew" of
>> the cppcms::session.
>>
>
> I understand what you say but this is not something that is supported.
>
> You may open a feature request to provide an access to server side
> session storage from an API that is not connected to a specific
> cppcms::http::context and renew session.
>
>
> What you can actually do is to implement an alternative server side storage:
>
> http://cppcms.com/cppcms_ref/1.0.2/classcppcms_1_1sessions_1_1session__storage.html
>
>
> That would allow you to handle the timeout in different way and probably update
> the session from your application directly.
>
> But this is a hack.
>
>
>> thanks
>> --
>> Christian Gmeiner, MSc
>>
>
>
> Artyom Beilis
> --------------
> CppCMS - C++ Web Framework: http://cppcms.com/
> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
>
> ------------------------------------------------------------------------------
> Minimize network downtime and maximize team effectiveness.
> Reduce network management and security costs.Learn how to hire
> the most talented Cisco Certified professionals. Visit the
> Employer Resources Portal
> http://www.cisco.com/web/learning/employer_resources/index.html
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
|
|
From: Artyom B. <art...@ya...> - 2013-04-03 06:48:05
|
----- Original Message -----
> 2013/4/2 Artyom Beilis <art...@ya...>:
>> Small notes:
>>
>> 1. Session is saved when the output stream is accessed first time, as you
>> need to provide set session cookies.
>>
>> Remember the session data may be stored entirely on the client
>> side in signed cookies.
>>
>
> "session" : {
> "expire" : "renew",
> "timeout" : 15,
> "location" : "server",
> "gc" : 10,
> "server": {
> "storage":"memory"
> }
> },
>
> The session data itself is store on the server side - or?
>
>> Saving session after output was provided is similar to an attempt
>> to set a cookie **after** HTTP headers were sent.
>>
>
> Okay
>
>> 2. Calling changing session values and calling save after the output
>> was generated has undefined behavior.
>>
>
> I am not changing any value stored in the session. I only want to renew
> the session. For me it is a problem when the cppcms session gets deleted
> if a script runs e.g. 15 minutes. On the client side there is only one open
> SSE stream.
Why wouldn't you increase the timeout on session such that it would not expire so quickly?
In general session is something long running - months, days, sometime hours for more sensitive
applications and tens of minutes for very sensitive applications like banking web sites.
The primary role of session is to carry user identification and other various user
specific properties.
>
>> So your code is incorrect.
>>
>> I think you mix up two different things: HTTP Stream session - the
>> state where the connection is open and you push the data to the stream
>> (it is represented by cppcms::http::context and actual open TCP/IP socket)
>> and the CppCMS/Web session the information shared **accorss** different
>> connections - that is based cookies - the state for stateless HTTP.
>>
>
> As far as I can tell from studying the source code a cppcms::http::context gets
> created if the client does a get/post.
> This context has access to the request(), the response() and the assigned cppcms
> session().
>
> In my case the life-time strategy is set to "renew". This means the
> client needs to
> do a get/post to create a cppcms::http::context as this action will
> trigger the "renew"
> logic - or?
>
> Is there a way to do the "renew" of the cppcms::session from the
> server side?
> Again from reading the code the cppcms::sessions::session_storage class
> provides methods to load and save session data. The garbage logic is inside
> such a inherited class.
No, if there is no request the session would get expired, regardless garbage
collection.
GC is needed to collect expired sessions but the session expiration does not
depend on GC, it is session specific property.
>
> If the session data is stored on the server side and the cookie in the
> browser only stores
> the session key it should be possible to renew a cppcms::session.
> And this is what I doing in this code snippet.
>
> void session_interface::renew_session()
> {
> loaded_ = 0;
> saved_ = 0;
>
> load();
> save();
> }
>
> If there is no way to "renew" the cppcms::session on the server side,
> I need to
> add some js code to the client side doing silly gets to trigger the
> "renew" of
> the cppcms::session.
>
I understand what you say but this is not something that is supported.
You may open a feature request to provide an access to server side
session storage from an API that is not connected to a specific
cppcms::http::context and renew session.
What you can actually do is to implement an alternative server side storage:
http://cppcms.com/cppcms_ref/1.0.2/classcppcms_1_1sessions_1_1session__storage.html
That would allow you to handle the timeout in different way and probably update
the session from your application directly.
But this is a hack.
> thanks
> --
> Christian Gmeiner, MSc
>
Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.com/
CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
|
|
From: Christian G. <chr...@gm...> - 2013-04-02 20:46:06
|
2013/4/2 Artyom Beilis <art...@ya...>:
> Small notes:
>
> 1. Session is saved when the output stream is accessed first time, as you
> need to provide set session cookies.
>
> Remember the session data may be stored entirely on the client
> side in signed cookies.
>
"session" : {
"expire" : "renew",
"timeout" : 15,
"location" : "server",
"gc" : 10,
"server": {
"storage":"memory"
}
},
The session data itself is store on the server side - or?
> Saving session after output was provided is similar to an attempt
> to set a cookie **after** HTTP headers were sent.
>
Okay
> 2. Calling changing session values and calling save after the output
> was generated has undefined behavior.
>
I am not changing any value stored in the session. I only want to renew
the session. For me it is a problem when the cppcms session gets deleted
if a script runs e.g. 15 minutes. On the client side there is only one open
SSE stream.
> So your code is incorrect.
>
> I think you mix up two different things: HTTP Stream session - the
> state where the connection is open and you push the data to the stream
> (it is represented by cppcms::http::context and actual open TCP/IP socket)
> and the CppCMS/Web session the information shared **accorss** different
> connections - that is based cookies - the state for stateless HTTP.
>
As far as I can tell from studying the source code a cppcms::http::context gets
created if the client does a get/post.
This context has access to the request(), the response() and the assigned cppcms
session().
In my case the life-time strategy is set to "renew". This means the
client needs to
do a get/post to create a cppcms::http::context as this action will
trigger the "renew"
logic - or?
Is there a way to do the "renew" of the cppcms::session from the server side?
Again from reading the code the cppcms::sessions::session_storage class
provides methods to load and save session data. The garbage logic is inside
such a inherited class.
If the session data is stored on the server side and the cookie in the
browser only stores
the session key it should be possible to renew a cppcms::session.
And this is what I doing in this code snippet.
void session_interface::renew_session()
{
loaded_ = 0;
saved_ = 0;
load();
save();
}
If there is no way to "renew" the cppcms::session on the server side, I need to
add some js code to the client side doing silly gets to trigger the "renew" of
the cppcms::session.
thanks
--
Christian Gmeiner, MSc
|
|
From: Artyom B. <art...@ya...> - 2013-04-02 20:15:01
|
Small notes: 1. Session is saved when the output stream is accessed first time, as you need to provide set session cookies. Remember the session data may be stored entirely on the client side in signed cookies. Saving session after output was provided is similar to an attempt to set a cookie **after** HTTP headers were sent. 2. Calling changing session values and calling save after the output was generated has undefined behavior. So your code is incorrect. I think you mix up two different things: HTTP Stream session - the state where the connection is open and you push the data to the stream (it is represented by cppcms::http::context and actual open TCP/IP socket) and the CppCMS/Web session the information shared **accorss** different connections - that is based cookies - the state for stateless HTTP. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ----- Original Message ----- > From: Christian Gmeiner <chr...@gm...> > To: Artyom Beilis <art...@ya...>; cpp...@li... > Cc: > Sent: Tuesday, April 2, 2013 7:58 PM > Subject: Re: [Cppcms-users] SSE keep-alive > > 2013/4/2 Christian Gmeiner <chr...@gm...>: >> 2013/4/2 Artyom Beilis <art...@ya...>: >>> Your code is incorrect, you must not use Mutexes... >>> >>> Instead of this: >>> >>>> void push(std::string const &event,std::string const > &data,bool >>>> send=true) >>>> { >>>> message msg; >>>> msg.event = event; >>>> msg.data = data; >>>> >>>> mutex.lock(); >>>> messages_.push(msg); >>>> mutex.unlock(); >>>> >>>> if(send) >>>> broadcast(); >>>> } >>> >>> >>> That I assume is called form an external thread you need to do > something different >>> >>> >>> void thread_safe_push(std::string const &event,std::string const > &data) >>> { message msg; >>> msg.event = event; >>> msg.data = data; >>> >>> >>> service().post([=] { (lambda expression) >>> >>> // EXECUTED IN THE EVENT LOOP THREAD!!! >>> messages_.push(msg); >>> broadcast(); >>> >>> }); >>> >>> } >>> >>> >>> or without C++11 >>> >>> void thread_safe_push(std::string const &event,std::string const > &data) >>> { message msg; >>> msg.event = event; >>> msg.data = data; >>> >>> >>> > service().post(boost::bind(&event_fifo::thread_unsef_push,this,msg)); >>> >>> } >>> >>> >>> void thread_unsefe_push(message const &msg) >>> >>> { messages_.push(msg); >>> broadcast(); >>> >>> } >>> >> >> Thanks... I got rid of the mutex. Is there a way to renew a session? I >> have tried to load() and save() the session during keep alive of the >> event stream, but it does not work as expected. >> >> void event_source::keep_alive(char const *comment) >> { >> if(closing_) { >> return; >> } >> for(streamers_type::iterator >> it=streamers_.begin();it!=streamers_.end();) { >> booster::intrusive_ptr<details::post_send> ps = *it; >> streamers_type::iterator tmp = it++; >> streamers_.erase(tmp); >> >> ps->stream().context()->response().out() << > ':' << >> comment << "\n\n"; >> ps->stream().context()->async_flush_output(ps); >> >> ps->stream().context()->session().load(); >> ps->stream().context()->session().save(); >> } >> >> ... >> >> >> My current session timeout is set to 10 minutes. If a script gets >> executed the GUI in the browser >> shows a modal dialog with the output of the executed process - send via > SSE. >> >> If the script runs longer then session timeout and gc() gets called >> the session will be removed. I want >> to renew the session in the keep_alive action of the SSE stream. >> > > As far as I can tell the session can only be loaded and saves once per > http_context. So > I added the following method: > > > void session_interface::renew_session() > { > loaded_ = 0; > saved_ = 0; > > load(); > save(); > } > > > And now I can renew the session. > > thanks > -- > Christian Gmeiner, MSc > |
|
From: Christian G. <chr...@gm...> - 2013-04-02 16:59:02
|
2013/4/2 Christian Gmeiner <chr...@gm...>:
> 2013/4/2 Artyom Beilis <art...@ya...>:
>> Your code is incorrect, you must not use Mutexes...
>>
>> Instead of this:
>>
>>> void push(std::string const &event,std::string const &data,bool
>>> send=true)
>>> {
>>> message msg;
>>> msg.event = event;
>>> msg.data = data;
>>>
>>> mutex.lock();
>>> messages_.push(msg);
>>> mutex.unlock();
>>>
>>> if(send)
>>> broadcast();
>>> }
>>
>>
>> That I assume is called form an external thread you need to do something different
>>
>>
>> void thread_safe_push(std::string const &event,std::string const &data)
>> { message msg;
>> msg.event = event;
>> msg.data = data;
>>
>>
>> service().post([=] { (lambda expression)
>>
>> // EXECUTED IN THE EVENT LOOP THREAD!!!
>> messages_.push(msg);
>> broadcast();
>>
>> });
>>
>> }
>>
>>
>> or without C++11
>>
>> void thread_safe_push(std::string const &event,std::string const &data)
>> { message msg;
>> msg.event = event;
>> msg.data = data;
>>
>>
>> service().post(boost::bind(&event_fifo::thread_unsef_push,this,msg));
>>
>> }
>>
>>
>> void thread_unsefe_push(message const &msg)
>>
>> { messages_.push(msg);
>> broadcast();
>>
>> }
>>
>
> Thanks... I got rid of the mutex. Is there a way to renew a session? I
> have tried to load() and save() the session during keep alive of the
> event stream, but it does not work as expected.
>
> void event_source::keep_alive(char const *comment)
> {
> if(closing_) {
> return;
> }
> for(streamers_type::iterator
> it=streamers_.begin();it!=streamers_.end();) {
> booster::intrusive_ptr<details::post_send> ps = *it;
> streamers_type::iterator tmp = it++;
> streamers_.erase(tmp);
>
> ps->stream().context()->response().out() << ':' <<
> comment << "\n\n";
> ps->stream().context()->async_flush_output(ps);
>
> ps->stream().context()->session().load();
> ps->stream().context()->session().save();
> }
>
> ...
>
>
> My current session timeout is set to 10 minutes. If a script gets
> executed the GUI in the browser
> shows a modal dialog with the output of the executed process - send via SSE.
>
> If the script runs longer then session timeout and gc() gets called
> the session will be removed. I want
> to renew the session in the keep_alive action of the SSE stream.
>
As far as I can tell the session can only be loaded and saves once per
http_context. So
I added the following method:
void session_interface::renew_session()
{
loaded_ = 0;
saved_ = 0;
load();
save();
}
And now I can renew the session.
thanks
--
Christian Gmeiner, MSc
|
|
From: Christian G. <chr...@gm...> - 2013-04-02 16:15:56
|
2013/4/2 Artyom Beilis <art...@ya...>:
> Your code is incorrect, you must not use Mutexes...
>
> Instead of this:
>
>> void push(std::string const &event,std::string const &data,bool
>> send=true)
>> {
>> message msg;
>> msg.event = event;
>> msg.data = data;
>>
>> mutex.lock();
>> messages_.push(msg);
>> mutex.unlock();
>>
>> if(send)
>> broadcast();
>> }
>
>
> That I assume is called form an external thread you need to do something different
>
>
> void thread_safe_push(std::string const &event,std::string const &data)
> { message msg;
> msg.event = event;
> msg.data = data;
>
>
> service().post([=] { (lambda expression)
>
> // EXECUTED IN THE EVENT LOOP THREAD!!!
> messages_.push(msg);
> broadcast();
>
> });
>
> }
>
>
> or without C++11
>
> void thread_safe_push(std::string const &event,std::string const &data)
> { message msg;
> msg.event = event;
> msg.data = data;
>
>
> service().post(boost::bind(&event_fifo::thread_unsef_push,this,msg));
>
> }
>
>
> void thread_unsefe_push(message const &msg)
>
> { messages_.push(msg);
> broadcast();
>
> }
>
Thanks... I got rid of the mutex. Is there a way to renew a session? I
have tried to load() and save() the session during keep alive of the
event stream, but it does not work as expected.
void event_source::keep_alive(char const *comment)
{
if(closing_) {
return;
}
for(streamers_type::iterator
it=streamers_.begin();it!=streamers_.end();) {
booster::intrusive_ptr<details::post_send> ps = *it;
streamers_type::iterator tmp = it++;
streamers_.erase(tmp);
ps->stream().context()->response().out() << ':' <<
comment << "\n\n";
ps->stream().context()->async_flush_output(ps);
ps->stream().context()->session().load();
ps->stream().context()->session().save();
}
...
My current session timeout is set to 10 minutes. If a script gets
executed the GUI in the browser
shows a modal dialog with the output of the executed process - send via SSE.
If the script runs longer then session timeout and gc() gets called
the session will be removed. I want
to renew the session in the keep_alive action of the SSE stream.
greets
--
Christian Gmeiner, MSc
|