cppcms-users Mailing List for CppCMS C++ Web Framework (Page 73)
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
|
From: Vinicius P. <ds...@ha...> - 2012-09-10 22:18:11
|
Hi, The problem is trailing newlines, change the code in the .sh to: echo -n "some string" | md5sum Note the -n option. HTH, Vinicius Em 10/09/2012, às 18:31, Lee Elenbaas escreveu: > i am attempting to use the md5 hashing > and apparently i am doing something wrong, since i get a different result then md5sum gives me > > i am attaching a zip with the relevant code and how i compare them > > if anyone can help me figure out what i did wrong in the crypto.cpp file - i will apriciate it > > lee > > > > <hash_test.zip>------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom B. <art...@ya...> - 2012-09-01 19:03:14
|
----- Original Message ----- > From: Vyacheslav Biruk <cp...@ma...> > To: cpp...@li... > Cc: > Sent: Saturday, September 1, 2012 8:49 PM > Subject: Re: [Cppcms-users] cppblog not work > > recompiled cppcms and cppblog with -DCMAKE_CXX_LINK_FLAGS=-rdynamic and all work > fine > > thank you. > It actually required for cppblog only, CppCMS build scripts automatically define this option Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: Vyacheslav B. <cp...@ma...> - 2012-09-01 18:15:50
|
recompiled cppcms and cppblog with -DCMAKE_CXX_LINK_FLAGS=-rdynamic and all work fine thank you. On Fri, Aug 31, 2012 at 11:46:19PM -0700, Artyom Beilis wrote: > You either misconfigured the location of the skins (views.paths) > or the cppblog code was build without -rdynamic/--export-dynamic build option > by default. > > I think this is the second (I hadn't tested cppblog of freebsd). > > Try to add > > > -DCMAKE_CXX_LINK_FLAGS=-rdynamic > > Option to cmake command and than run make once again. > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > > ----- Original Message ----- > > From: Vyacheslav Biruk <ma...@ch...> > > To: cpp...@li... > > Cc: > > Sent: Friday, August 31, 2012 5:17 PM > > Subject: [Cppcms-users] cppblog not work > > > > Hello > > > > FreeBSD 8.3-RELEASE-p4 i386 > > cppblog_0.1.0 > > cppcms-1.0.2 and cppcms-1.0.0 > > cppdb-0.3.1 > > Python 2.7.3 > > cmake version 2.8.8 > > PCRE version 8.31 2012-07-06 > > gcc (GCC) 4.2.2 20070831 prerelease [FreeBSD] > > icu-4.8.1.1_1 > > > > after the configuration to any request I get the following error: > > 2012-08-31 13:42:40; cppcms, error: Caught exception > > [cppcms::views::generator: an attempt to use content if invalid type] > > (http_context.cpp:139) > > > > What's the problem? > > Where to look? > > What to do? > > > > -- > > Best regards, > > magic > > > > ------------------------------------------------------------------------------ > > Live Security Virtual Conference > > Exclusive live event will cover all the ways today's security and > > threat landscape has changed and how IT managers can respond. Discussions > > will include endpoint security, mobile security and the latest in malware > > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users -- Best regards, magic |
From: Artyom B. <art...@ya...> - 2012-09-01 13:57:07
|
I don't remember exact API from the head, try - there are plenty ways to do stuff http://cppcms.com/wikipp/en/page/cppcms_1x_json For example, this works.. std::vector<booster::shared_ptr<int> > vals; vals.push_back(booster::shared_ptr<int>( new int(1))); vals.push_back(booster::shared_ptr<int>( new int(2))); cppcms::json::value v; v["x"]=cppcms::json::array(); cppcms::json::array &a = v["x"].array(); a.resize(vals.size()); for(size_t i = 0;i<vals.size();i++) a[i] = *vals[i]; std::cout << v << std::endl; Also if you don't want to do copy... use cppcms::json::value::swap That not that hard :-) Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: 陈抒 <csf...@gm...> >To: Artyom Beilis <art...@ya...>; cpp...@li... >Sent: Saturday, September 1, 2012 4:26 PM >Subject: Re: [Cppcms-users] Compile error: traits is not a template > > >Also, when I said deep copy, I mean the following codes: > > >for(size_t i = 0;i<in.values_.size();i++) > a[i]=*in.values_[i]; > > > >陈抒 >Best regards >http://blog.csdn.net/sheismylife > > > >On Sat, Sep 1, 2012 at 9:24 PM, 陈抒 <csf...@gm...> wrote: > >I tried you codes the first time. It can't be compiled. >> >> >>$ make >>Scanning dependencies of target cppweb >>[ 3%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o >>In file included from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1:0: >>/home/chenshu/work/kaimei/cppweb/include/groups.h: In static member function ‘static void cppcms::json::traits<kaimei::groups>::set(cppcms::json::value&, const kaimei::groups&)’: >>/home/chenshu/work/kaimei/cppweb/include/groups.h:39:60: error: invalid initialization of non-const reference of type ‘cppcms::json::array& {aka std::vector<cppcms::json::value>&}’ from an rvalue of type ‘void’ >>make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 >>make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 >>make: *** [all] Error 2 >> >> >>line 39 is : >>cppcms::json::array &a=v.at("values",cppcms::json::array()); >> >> >>I upgraded CppCMS to latest version, also read your API document. >>It seems your 'at' member function return 'void' >> >>陈抒 >>Best regards >>http://blog.csdn.net/sheismylife >> >> >> >>On Sat, Sep 1, 2012 at 9:15 PM, Artyom Beilis <art...@ya...> wrote: >> >>You hadn't read my code correctly >>> >>> >>>cppcms::json::array &a=v.at("values",cppcms::json::array()); >>> >>> >>>a is a reference and you fill it. >>> >>> >>>Anyway read the cppcms::json::value reference documentation for further details >>> >>> >>>Artyom Beilis >>>-------------- >>>CppCMS - C++ Web Framework: http://cppcms.com/ >>>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >>> >>> >>> >>>>________________________________ >>>> From: 陈抒 <csf...@gm...> >>>>To: Artyom Beilis <art...@ya...>; cpp...@li... >>>>Sent: Saturday, September 1, 2012 3:32 PM >>>> >>>>Subject: Re: [Cppcms-users] Compile error: traits is not a template >>>> >>>> >>>> >>>>I changed your codes a bit. >>>>namespace cppcms { >>>> namespace json { >>>> >>>> >>>> template<> >>>> struct traits<kaimei::groups> { >>>> >>>> >>>> static void set(value &v, kaimei::groups const& in) { >>>>v.set("size", in.size()); >>>>cppcms::json::array a; >>>>a.resize(in.values_.size()); >>>>for(size_t i = 0; i < in.values_.size(); i++) { >>>> a[i]=*in.values_[i]; >>>>} >>>>v.set("values", a); >>>> } >>>> }; >>>> >>>> >>>> } >>>>} >>>> >>>> >>>>Two issues: >>>>1. This way is not efficient, a lot of deep copy would occur when copying vector from array. >>>>My original way is very simple, create a stringstream object, groups object converts all member variables into string, append them to stringstream. It does not looks elegant, but faster. >>>>2. It doesn't work. I got an exception: >>>>cppcms::json::bad_cast: error converting from object >>>> >>>> >>>>陈抒 >>>>Best regards >>>>http://blog.csdn.net/sheismylife >>>> >>>> >>>> >>>>On Sat, Sep 1, 2012 at 5:41 PM, Artyom Beilis <art...@ya...> wrote: >>>> >>>>Because shared_ptr<group> is not specialized for traits... >>>>> >>>>>You need manually create an array and sets its memebers.i.e >>>>> >>>>>Something like that: >>>>> >>>>>cppcms::json::array &a=v.at("values",cppcms::json::array()); >>>>>a.resize(in.values_.size()); >>>>>for(size_t i = 0;i<in.values_.size();i++) >>>>> a[i]=*in.values_[i]; >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>Artyom Beilis >>>>>-------------- >>>>>CppCMS - C++ Web Framework: http://cppcms.com/ >>>>>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >>>>> >>>>> >>>>> >>>>>>________________________________ >>>>>> From: 陈抒 <csf...@gm...> >>>>>>To: Artyom Beilis <art...@ya...>; cpp...@li... >>>>>>Sent: Saturday, September 1, 2012 10:05 AM >>>>>>Subject: Re: [Cppcms-users] Compile error: traits is not a template >>>>> >>>>>> >>>>>> >>>>>>Thank you. But I see new error. >>>>>>groups.h file: >>>>>> >>>>>> >>>>>>#ifndef __GROUPS_H >>>>>>#define __GROUPS_H >>>>>> >>>>>> >>>>>>#include <vector> >>>>>>#include <boost/shared_ptr.hpp> >>>>>>#include "group.h" >>>>>> >>>>>> >>>>>>namespace kaimei{ >>>>>> >>>>>> >>>>>> class groups{ >>>>>> public: >>>>>> typedef std::vector<boost::shared_ptr<group> >::iterator iterator; >>>>>> typedef std::vector<boost::shared_ptr<group> >::const_iterator const_iterator; >>>>>> >>>>>> >>>>>> void add(boost::shared_ptr<group> g); >>>>>> >>>>>> >>>>>> bool empty() const; >>>>>> >>>>>> >>>>>> unsigned int size() const; >>>>>> >>>>>> >>>>>> std::string json_string() const; >>>>>> >>>>>> friend class cppcms::json::traits<kaimei::groups>; >>>>>> >>>>>> >>>>>> private: >>>>>> std::vector<boost::shared_ptr<kaimei::group> > values_; >>>>>> }; >>>>>> >>>>>> >>>>>>} >>>>>> >>>>>> >>>>>>namespace cppcms { >>>>>> namespace json { >>>>>> >>>>>> >>>>>> template<> >>>>>> struct traits<kaimei::groups> { >>>>>> >>>>>> >>>>>> static void set(value &v, kaimei::groups const& in) { >>>>>>v.set("size", in.size()); >>>>>>v.set("values", in.values_); >>>>>> } >>>>>> }; >>>>>> >>>>>> >>>>>> } >>>>>>} >>>>>> >>>>>> >>>>>>#endif >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>error message: >>>>>> 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, ../../src/view/login.cpp, ../../src/view/group_management.cpp >>>>>>[ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o >>>>>>In file included from /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, >>>>>> from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, >>>>>> from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: >>>>>>/usr/include/cppcms/json.h: In member function ‘void cppcms::json::value::set_value(const T&) [with T = boost::shared_ptr<kaimei::group>]’: >>>>>>/usr/include/cppcms/json.h:604:5: instantiated from ‘static void cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ >>>>>>/usr/include/cppcms/json.h:247:4: instantiated from ‘void cppcms::json::value::set_value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >>>>>>/usr/include/cppcms/json.h:316:4: instantiated from ‘cppcms::json::value::value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >>>>>>/usr/include/cppcms/json.h:352:4: instantiated from ‘void cppcms::json::value::set(const char*, const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >>>>>>/home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated from here >>>>>>/usr/include/cppcms/json.h:247:4: error: incomplete type ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested name specifier >>>>>>make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 >>>>>>make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 >>>>>>make: *** [all] Error 2 >>>>>> >>>>>> >>>>>>陈抒 >>>>>>Best regards >>>>>>http://blog.csdn.net/sheismylife >>>>>> >>>>>> >>>>>> >>>>>>On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>>>But I got error when compiling another class. It has group.h and group.cpp file. >>>>>>>> >>>>>>>> >>>>>>>>#ifndef __GROUP_H >>>>>>>>#define __GROUP_H >>>>>>>> >>>>>>>> >>>>>>>>#include <string> >>>>>>>> >>>>>>>> >>>>>>>>namespace kaimei{ >>>>>>>>... >>>>>>> >>>>>>>} >>>>>>>> >>>>>>>> >>>>>>>>namespace cppcms { >>>>>>>> namespace json { >>>>>>>> template<> >>>>>>>> struct traits<kaimei::group> { >>>>>>>>... >>>>>>>> } >>>>>>>> } >>>>>>>>} >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> [snip] >>>>>>> >>>>>>>> >>>>>>>>I am not good at template programming. Why did this happen? >>>>>>>> >>>>>>> >>>>>>>You can't specialize undefined struct - you need to include <cppcms/json.h> >>>>>>>header. It provides the original traits struct and than you specialize it for >>>>>>>your type of class >>>>>>> >>>>>>> >>>>>>> >>>>>>>> >>>>>>>>陈抒 >>>>>>>>Best regards >>>>>>>>http://blog.csdn.net/sheismylife >>>>>>>> >>>>>>> >>>>>>>Regards, >>>>>>>Artyom >>>>>>> >>>>>>> >>>>>>>------------------------------------------------------------------------------ >>>>>>>Live Security Virtual Conference >>>>>>>Exclusive live event will cover all the ways today's security and >>>>>>>threat landscape has changed and how IT managers can respond. Discussions >>>>>>>will include endpoint security, mobile security and the latest in malware >>>>>>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>>_______________________________________________ >>>>>>>Cppcms-users mailing list >>>>>>>Cpp...@li... >>>>>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>>>>> >>>>>> >>>>>>------------------------------------------------------------------------------ >>>>>>Live Security Virtual Conference >>>>>>Exclusive live event will cover all the ways today's security and >>>>>>threat landscape has changed and how IT managers can respond. Discussions >>>>>>will include endpoint security, mobile security and the latest in malware >>>>>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>_______________________________________________ >>>>>>Cppcms-users mailing list >>>>>>Cpp...@li... >>>>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>>>> >>>>>> >>>>>> >>>>> >>>>>------------------------------------------------------------------------------ >>>>>Live Security Virtual Conference >>>>>Exclusive live event will cover all the ways today's security and >>>>>threat landscape has changed and how IT managers can respond. Discussions >>>>>will include endpoint security, mobile security and the latest in malware >>>>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>_______________________________________________ >>>>>Cppcms-users mailing list >>>>>Cpp...@li... >>>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>>> >>>> >>>>------------------------------------------------------------------------------ >>>>Live Security Virtual Conference >>>>Exclusive live event will cover all the ways today's security and >>>>threat landscape has changed and how IT managers can respond. Discussions >>>>will include endpoint security, mobile security and the latest in malware >>>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>_______________________________________________ >>>>Cppcms-users mailing list >>>>Cpp...@li... >>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>> >>>> >>>> >>>------------------------------------------------------------------------------ >>>Live Security Virtual Conference >>>Exclusive live event will cover all the ways today's security and >>>threat landscape has changed and how IT managers can respond. Discussions >>>will include endpoint security, mobile security and the latest in malware >>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>_______________________________________________ >>>Cppcms-users mailing list >>>Cpp...@li... >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>> >> > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: 陈抒 <csf...@gm...> - 2012-09-01 13:27:24
|
Also, when I said deep copy, I mean the following codes: for(size_t i = 0;i<in.values_.size();i++) a[i]=*in.values_[i]; 陈抒 Best regards http://blog.csdn.net/sheismylife On Sat, Sep 1, 2012 at 9:24 PM, 陈抒 <csf...@gm...> wrote: > I tried you codes the first time. It can't be compiled. > > $ make > Scanning dependencies of target cppweb > [ 3%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o > In file included from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1:0: > /home/chenshu/work/kaimei/cppweb/include/groups.h: In static member > function ‘static void > cppcms::json::traits<kaimei::groups>::set(cppcms::json::value&, const > kaimei::groups&)’: > /home/chenshu/work/kaimei/cppweb/include/groups.h:39:60: error: invalid > initialization of non-const reference of type ‘cppcms::json::array& {aka > std::vector<cppcms::json::value>&}’ from an rvalue of type ‘void’ > make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 > make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 > make: *** [all] Error 2 > > line 39 is : > cppcms::json::array &a=v.at("values",cppcms::json::array()); > > I upgraded CppCMS to latest version, also read your API document. > It seems your 'at' member function return 'void' > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > On Sat, Sep 1, 2012 at 9:15 PM, Artyom Beilis <art...@ya...> wrote: > >> You hadn't read my code correctly >> >> cppcms::json::array &a=v.at("values",cppcms::json::array()); >> >> a is a reference and you fill it. >> >> Anyway read the cppcms::json::value reference documentation for further >> details >> >> Artyom Beilis >> -------------- >> CppCMS - C++ Web Framework: http://cppcms.com/ >> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> ------------------------------ >> *From:* 陈抒 <csf...@gm...> >> *To:* Artyom Beilis <art...@ya...>; >> cpp...@li... >> *Sent:* Saturday, September 1, 2012 3:32 PM >> >> *Subject:* Re: [Cppcms-users] Compile error: traits is not a template >> >> I changed your codes a bit. >> namespace cppcms { >> namespace json { >> >> template<> >> struct traits<kaimei::groups> { >> >> static void set(value &v, kaimei::groups const& in) { >> v.set("size", in.size()); >> cppcms::json::array a; >> a.resize(in.values_.size()); >> for(size_t i = 0; i < in.values_.size(); i++) { >> a[i]=*in.values_[i]; >> } >> v.set("values", a); >> } >> }; >> >> } >> } >> >> Two issues: >> 1. This way is not efficient, a lot of deep copy would occur when copying >> vector from array. >> My original way is very simple, create a stringstream object, groups >> object converts all member variables into string, append them to >> stringstream. It does not looks elegant, but faster. >> 2. It doesn't work. I got an exception: >> cppcms::json::bad_cast: error converting from object >> >> >> 陈抒 >> Best regards >> http://blog.csdn.net/sheismylife >> >> >> On Sat, Sep 1, 2012 at 5:41 PM, Artyom Beilis <art...@ya...>wrote: >> >> Because shared_ptr<group> is not specialized for traits... >> >> You need manually create an array and sets its memebers.i.e >> >> Something like that: >> >> cppcms::json::array &a=v.at("values",cppcms::json::array()); >> a.resize(in.values_.size()); >> for(size_t i = 0;i<in.values_.size();i++) >> a[i]=*in.values_[i]; >> >> >> >> >> >> Artyom Beilis >> -------------- >> CppCMS - C++ Web Framework: http://cppcms.com/ >> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> >> >> >________________________________ >> > From: 陈抒 <csf...@gm...> >> >To: Artyom Beilis <art...@ya...>; >> cpp...@li... >> >Sent: Saturday, September 1, 2012 10:05 AM >> >Subject: Re: [Cppcms-users] Compile error: traits is not a template >> > >> > >> >Thank you. But I see new error. >> >groups.h file: >> > >> > >> >#ifndef __GROUPS_H >> >#define __GROUPS_H >> > >> > >> >#include <vector> >> >#include <boost/shared_ptr.hpp> >> >#include "group.h" >> > >> > >> >namespace kaimei{ >> > >> > >> > class groups{ >> > public: >> > typedef std::vector<boost::shared_ptr<group> >::iterator iterator; >> > typedef std::vector<boost::shared_ptr<group> >::const_iterator >> const_iterator; >> > >> > >> > void add(boost::shared_ptr<group> g); >> > >> > >> > bool empty() const; >> > >> > >> > unsigned int size() const; >> > >> > >> > std::string json_string() const; >> > >> > friend class cppcms::json::traits<kaimei::groups>; >> > >> > >> > private: >> > std::vector<boost::shared_ptr<kaimei::group> > values_; >> > }; >> > >> > >> >} >> > >> > >> >namespace cppcms { >> > namespace json { >> > >> > >> > template<> >> > struct traits<kaimei::groups> { >> > >> > >> > static void set(value &v, kaimei::groups const& in) { >> >v.set("size", in.size()); >> >v.set("values", in.values_); >> > } >> > }; >> > >> > >> > } >> >} >> > >> > >> >#endif >> > >> > >> > >> > >> >error message: >> > 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, >> ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, >> ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, >> ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, >> ../../src/view/login.cpp, ../../src/view/group_management.cpp >> >[ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o >> >In file included from >> /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, >> > from >> /home/chenshu/work/kaimei/cppweb/include/groups.h:6, >> > from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: >> >/usr/include/cppcms/json.h: In member function ‘void >> cppcms::json::value::set_value(const T&) [with T = >> boost::shared_ptr<kaimei::group>]’: >> >/usr/include/cppcms/json.h:604:5: instantiated from ‘static void >> cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const >> std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ >> >/usr/include/cppcms/json.h:247:4: instantiated from ‘void >> cppcms::json::value::set_value(const T&) [with T = >> std::vector<boost::shared_ptr<kaimei::group> >]’ >> >/usr/include/cppcms/json.h:316:4: instantiated from >> ‘cppcms::json::value::value(const T&) [with T = >> std::vector<boost::shared_ptr<kaimei::group> >]’ >> >/usr/include/cppcms/json.h:352:4: instantiated from ‘void >> cppcms::json::value::set(const char*, const T&) [with T = >> std::vector<boost::shared_ptr<kaimei::group> >]’ >> >/home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated >> from here >> >/usr/include/cppcms/json.h:247:4: error: incomplete type >> ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested >> name specifier >> >make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 >> >make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 >> >make: *** [all] Error 2 >> > >> > >> >陈抒 >> >Best regards >> >http://blog.csdn.net/sheismylife >> > >> > >> > >> >On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> >> wrote: >> > >> >> >> >> >> >>>But I got error when compiling another class. It has group.h and >> group.cpp file. >> >>> >> >>> >> >>>#ifndef __GROUP_H >> >>>#define __GROUP_H >> >>> >> >>> >> >>>#include <string> >> >>> >> >>> >> >>>namespace kaimei{ >> >>>... >> >> >> >>} >> >>> >> >>> >> >>>namespace cppcms { >> >>> namespace json { >> >>> template<> >> >>> struct traits<kaimei::group> { >> >>>... >> >>> } >> >>> } >> >>>} >> >>> >> >>> >> >>> >> >>> [snip] >> >> >> >>> >> >>>I am not good at template programming. Why did this happen? >> >>> >> >> >> >>You can't specialize undefined struct - you need to include >> <cppcms/json.h> >> >>header. It provides the original traits struct and than you specialize >> it for >> >>your type of class >> >> >> >> >> >> >> >>> >> >>>陈抒 >> >>>Best regards >> >>>http://blog.csdn.net/sheismylife >> >>> >> >> >> >>Regards, >> >>Artyom >> >> >> >> >> >> >>------------------------------------------------------------------------------ >> >>Live Security Virtual Conference >> >>Exclusive live event will cover all the ways today's security and >> >>threat landscape has changed and how IT managers can respond. >> Discussions >> >>will include endpoint security, mobile security and the latest in >> malware >> >>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> >>_______________________________________________ >> >>Cppcms-users mailing list >> >>Cpp...@li... >> >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> > >> >> >------------------------------------------------------------------------------ >> >Live Security Virtual Conference >> >Exclusive live event will cover all the ways today's security and >> >threat landscape has changed and how IT managers can respond. Discussions >> >will include endpoint security, mobile security and the latest in malware >> >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> >_______________________________________________ >> >Cppcms-users mailing list >> >Cpp...@li... >> >https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >> > >> > >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> > |
From: 陈抒 <csf...@gm...> - 2012-09-01 13:24:45
|
I tried you codes the first time. It can't be compiled. $ make Scanning dependencies of target cppweb [ 3%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o In file included from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1:0: /home/chenshu/work/kaimei/cppweb/include/groups.h: In static member function ‘static void cppcms::json::traits<kaimei::groups>::set(cppcms::json::value&, const kaimei::groups&)’: /home/chenshu/work/kaimei/cppweb/include/groups.h:39:60: error: invalid initialization of non-const reference of type ‘cppcms::json::array& {aka std::vector<cppcms::json::value>&}’ from an rvalue of type ‘void’ make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 make: *** [all] Error 2 line 39 is : cppcms::json::array &a=v.at("values",cppcms::json::array()); I upgraded CppCMS to latest version, also read your API document. It seems your 'at' member function return 'void' 陈抒 Best regards http://blog.csdn.net/sheismylife On Sat, Sep 1, 2012 at 9:15 PM, Artyom Beilis <art...@ya...> wrote: > You hadn't read my code correctly > > cppcms::json::array &a=v.at("values",cppcms::json::array()); > > a is a reference and you fill it. > > Anyway read the cppcms::json::value reference documentation for further > details > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------ > *From:* 陈抒 <csf...@gm...> > *To:* Artyom Beilis <art...@ya...>; > cpp...@li... > *Sent:* Saturday, September 1, 2012 3:32 PM > > *Subject:* Re: [Cppcms-users] Compile error: traits is not a template > > I changed your codes a bit. > namespace cppcms { > namespace json { > > template<> > struct traits<kaimei::groups> { > > static void set(value &v, kaimei::groups const& in) { > v.set("size", in.size()); > cppcms::json::array a; > a.resize(in.values_.size()); > for(size_t i = 0; i < in.values_.size(); i++) { > a[i]=*in.values_[i]; > } > v.set("values", a); > } > }; > > } > } > > Two issues: > 1. This way is not efficient, a lot of deep copy would occur when copying > vector from array. > My original way is very simple, create a stringstream object, groups > object converts all member variables into string, append them to > stringstream. It does not looks elegant, but faster. > 2. It doesn't work. I got an exception: > cppcms::json::bad_cast: error converting from object > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > On Sat, Sep 1, 2012 at 5:41 PM, Artyom Beilis <art...@ya...> wrote: > > Because shared_ptr<group> is not specialized for traits... > > You need manually create an array and sets its memebers.i.e > > Something like that: > > cppcms::json::array &a=v.at("values",cppcms::json::array()); > a.resize(in.values_.size()); > for(size_t i = 0;i<in.values_.size();i++) > a[i]=*in.values_[i]; > > > > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > > >________________________________ > > From: 陈抒 <csf...@gm...> > >To: Artyom Beilis <art...@ya...>; > cpp...@li... > >Sent: Saturday, September 1, 2012 10:05 AM > >Subject: Re: [Cppcms-users] Compile error: traits is not a template > > > > > >Thank you. But I see new error. > >groups.h file: > > > > > >#ifndef __GROUPS_H > >#define __GROUPS_H > > > > > >#include <vector> > >#include <boost/shared_ptr.hpp> > >#include "group.h" > > > > > >namespace kaimei{ > > > > > > class groups{ > > public: > > typedef std::vector<boost::shared_ptr<group> >::iterator iterator; > > typedef std::vector<boost::shared_ptr<group> >::const_iterator > const_iterator; > > > > > > void add(boost::shared_ptr<group> g); > > > > > > bool empty() const; > > > > > > unsigned int size() const; > > > > > > std::string json_string() const; > > > > friend class cppcms::json::traits<kaimei::groups>; > > > > > > private: > > std::vector<boost::shared_ptr<kaimei::group> > values_; > > }; > > > > > >} > > > > > >namespace cppcms { > > namespace json { > > > > > > template<> > > struct traits<kaimei::groups> { > > > > > > static void set(value &v, kaimei::groups const& in) { > >v.set("size", in.size()); > >v.set("values", in.values_); > > } > > }; > > > > > > } > >} > > > > > >#endif > > > > > > > > > >error message: > > 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, > ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, > ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, > ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, > ../../src/view/login.cpp, ../../src/view/group_management.cpp > >[ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o > >In file included from > /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, > > from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, > > from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: > >/usr/include/cppcms/json.h: In member function ‘void > cppcms::json::value::set_value(const T&) [with T = > boost::shared_ptr<kaimei::group>]’: > >/usr/include/cppcms/json.h:604:5: instantiated from ‘static void > cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const > std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ > >/usr/include/cppcms/json.h:247:4: instantiated from ‘void > cppcms::json::value::set_value(const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > >/usr/include/cppcms/json.h:316:4: instantiated from > ‘cppcms::json::value::value(const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > >/usr/include/cppcms/json.h:352:4: instantiated from ‘void > cppcms::json::value::set(const char*, const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > >/home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated > from here > >/usr/include/cppcms/json.h:247:4: error: incomplete type > ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested > name specifier > >make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 > >make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 > >make: *** [all] Error 2 > > > > > >陈抒 > >Best regards > >http://blog.csdn.net/sheismylife > > > > > > > >On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> > wrote: > > > >> > >> > >>>But I got error when compiling another class. It has group.h and > group.cpp file. > >>> > >>> > >>>#ifndef __GROUP_H > >>>#define __GROUP_H > >>> > >>> > >>>#include <string> > >>> > >>> > >>>namespace kaimei{ > >>>... > >> > >>} > >>> > >>> > >>>namespace cppcms { > >>> namespace json { > >>> template<> > >>> struct traits<kaimei::group> { > >>>... > >>> } > >>> } > >>>} > >>> > >>> > >>> > >>> [snip] > >> > >>> > >>>I am not good at template programming. Why did this happen? > >>> > >> > >>You can't specialize undefined struct - you need to include > <cppcms/json.h> > >>header. It provides the original traits struct and than you specialize > it for > >>your type of class > >> > >> > >> > >>> > >>>陈抒 > >>>Best regards > >>>http://blog.csdn.net/sheismylife > >>> > >> > >>Regards, > >>Artyom > >> > >> > > >>------------------------------------------------------------------------------ > >>Live Security Virtual Conference > >>Exclusive live event will cover all the ways today's security and > >>threat landscape has changed and how IT managers can respond. Discussions > >>will include endpoint security, mobile security and the latest in malware > >>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > >>_______________________________________________ > >>Cppcms-users mailing list > >>Cpp...@li... > >>https://lists.sourceforge.net/lists/listinfo/cppcms-users > >> > > > > >------------------------------------------------------------------------------ > >Live Security Virtual Conference > >Exclusive live event will cover all the ways today's security and > >threat landscape has changed and how IT managers can respond. Discussions > >will include endpoint security, mobile security and the latest in malware > >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > >_______________________________________________ > >Cppcms-users mailing list > >Cpp...@li... > >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
From: Artyom B. <art...@ya...> - 2012-09-01 13:15:33
|
You hadn't read my code correctly cppcms::json::array &a=v.at("values",cppcms::json::array()); a is a reference and you fill it. Anyway read the cppcms::json::value reference documentation for further details Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: 陈抒 <csf...@gm...> >To: Artyom Beilis <art...@ya...>; cpp...@li... >Sent: Saturday, September 1, 2012 3:32 PM >Subject: Re: [Cppcms-users] Compile error: traits is not a template > > >I changed your codes a bit. >namespace cppcms { > namespace json { > > > template<> > struct traits<kaimei::groups> { > > > static void set(value &v, kaimei::groups const& in) { >v.set("size", in.size()); >cppcms::json::array a; >a.resize(in.values_.size()); >for(size_t i = 0; i < in.values_.size(); i++) { > a[i]=*in.values_[i]; >} >v.set("values", a); > } > }; > > > } >} > > >Two issues: >1. This way is not efficient, a lot of deep copy would occur when copying vector from array. >My original way is very simple, create a stringstream object, groups object converts all member variables into string, append them to stringstream. It does not looks elegant, but faster. >2. It doesn't work. I got an exception: >cppcms::json::bad_cast: error converting from object > > >陈抒 >Best regards >http://blog.csdn.net/sheismylife > > > >On Sat, Sep 1, 2012 at 5:41 PM, Artyom Beilis <art...@ya...> wrote: > >Because shared_ptr<group> is not specialized for traits... >> >>You need manually create an array and sets its memebers.i.e >> >>Something like that: >> >>cppcms::json::array &a=v.at("values",cppcms::json::array()); >>a.resize(in.values_.size()); >>for(size_t i = 0;i<in.values_.size();i++) >> a[i]=*in.values_[i]; >> >> >> >> >> >>Artyom Beilis >>-------------- >>CppCMS - C++ Web Framework: http://cppcms.com/ >>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> >> >>>________________________________ >>> From: 陈抒 <csf...@gm...> >>>To: Artyom Beilis <art...@ya...>; cpp...@li... >>>Sent: Saturday, September 1, 2012 10:05 AM >>>Subject: Re: [Cppcms-users] Compile error: traits is not a template >> >>> >>> >>>Thank you. But I see new error. >>>groups.h file: >>> >>> >>>#ifndef __GROUPS_H >>>#define __GROUPS_H >>> >>> >>>#include <vector> >>>#include <boost/shared_ptr.hpp> >>>#include "group.h" >>> >>> >>>namespace kaimei{ >>> >>> >>> class groups{ >>> public: >>> typedef std::vector<boost::shared_ptr<group> >::iterator iterator; >>> typedef std::vector<boost::shared_ptr<group> >::const_iterator const_iterator; >>> >>> >>> void add(boost::shared_ptr<group> g); >>> >>> >>> bool empty() const; >>> >>> >>> unsigned int size() const; >>> >>> >>> std::string json_string() const; >>> >>> friend class cppcms::json::traits<kaimei::groups>; >>> >>> >>> private: >>> std::vector<boost::shared_ptr<kaimei::group> > values_; >>> }; >>> >>> >>>} >>> >>> >>>namespace cppcms { >>> namespace json { >>> >>> >>> template<> >>> struct traits<kaimei::groups> { >>> >>> >>> static void set(value &v, kaimei::groups const& in) { >>>v.set("size", in.size()); >>>v.set("values", in.values_); >>> } >>> }; >>> >>> >>> } >>>} >>> >>> >>>#endif >>> >>> >>> >>> >>>error message: >>> 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, ../../src/view/login.cpp, ../../src/view/group_management.cpp >>>[ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o >>>In file included from /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, >>> from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, >>> from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: >>>/usr/include/cppcms/json.h: In member function ‘void cppcms::json::value::set_value(const T&) [with T = boost::shared_ptr<kaimei::group>]’: >>>/usr/include/cppcms/json.h:604:5: instantiated from ‘static void cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ >>>/usr/include/cppcms/json.h:247:4: instantiated from ‘void cppcms::json::value::set_value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >>>/usr/include/cppcms/json.h:316:4: instantiated from ‘cppcms::json::value::value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >>>/usr/include/cppcms/json.h:352:4: instantiated from ‘void cppcms::json::value::set(const char*, const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >>>/home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated from here >>>/usr/include/cppcms/json.h:247:4: error: incomplete type ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested name specifier >>>make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 >>>make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 >>>make: *** [all] Error 2 >>> >>> >>>陈抒 >>>Best regards >>>http://blog.csdn.net/sheismylife >>> >>> >>> >>>On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> wrote: >>> >>>> >>>> >>>>>But I got error when compiling another class. It has group.h and group.cpp file. >>>>> >>>>> >>>>>#ifndef __GROUP_H >>>>>#define __GROUP_H >>>>> >>>>> >>>>>#include <string> >>>>> >>>>> >>>>>namespace kaimei{ >>>>>... >>>> >>>>} >>>>> >>>>> >>>>>namespace cppcms { >>>>> namespace json { >>>>> template<> >>>>> struct traits<kaimei::group> { >>>>>... >>>>> } >>>>> } >>>>>} >>>>> >>>>> >>>>> >>>>> [snip] >>>> >>>>> >>>>>I am not good at template programming. Why did this happen? >>>>> >>>> >>>>You can't specialize undefined struct - you need to include <cppcms/json.h> >>>>header. It provides the original traits struct and than you specialize it for >>>>your type of class >>>> >>>> >>>> >>>>> >>>>>陈抒 >>>>>Best regards >>>>>http://blog.csdn.net/sheismylife >>>>> >>>> >>>>Regards, >>>>Artyom >>>> >>>> >>>>------------------------------------------------------------------------------ >>>>Live Security Virtual Conference >>>>Exclusive live event will cover all the ways today's security and >>>>threat landscape has changed and how IT managers can respond. Discussions >>>>will include endpoint security, mobile security and the latest in malware >>>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>_______________________________________________ >>>>Cppcms-users mailing list >>>>Cpp...@li... >>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>> >>> >>>------------------------------------------------------------------------------ >>>Live Security Virtual Conference >>>Exclusive live event will cover all the ways today's security and >>>threat landscape has changed and how IT managers can respond. Discussions >>>will include endpoint security, mobile security and the latest in malware >>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>_______________________________________________ >>>Cppcms-users mailing list >>>Cpp...@li... >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>> >>> >> >>------------------------------------------------------------------------------ >>Live Security Virtual Conference >>Exclusive live event will cover all the ways today's security and >>threat landscape has changed and how IT managers can respond. Discussions >>will include endpoint security, mobile security and the latest in malware >>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: 陈抒 <csf...@gm...> - 2012-09-01 12:32:59
|
I changed your codes a bit. namespace cppcms { namespace json { template<> struct traits<kaimei::groups> { static void set(value &v, kaimei::groups const& in) { v.set("size", in.size()); cppcms::json::array a; a.resize(in.values_.size()); for(size_t i = 0; i < in.values_.size(); i++) { a[i]=*in.values_[i]; } v.set("values", a); } }; } } Two issues: 1. This way is not efficient, a lot of deep copy would occur when copying vector from array. My original way is very simple, create a stringstream object, groups object converts all member variables into string, append them to stringstream. It does not looks elegant, but faster. 2. It doesn't work. I got an exception: cppcms::json::bad_cast: error converting from object 陈抒 Best regards http://blog.csdn.net/sheismylife On Sat, Sep 1, 2012 at 5:41 PM, Artyom Beilis <art...@ya...> wrote: > Because shared_ptr<group> is not specialized for traits... > > You need manually create an array and sets its memebers.i.e > > Something like that: > > cppcms::json::array &a=v.at("values",cppcms::json::array()); > a.resize(in.values_.size()); > for(size_t i = 0;i<in.values_.size();i++) > a[i]=*in.values_[i]; > > > > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > > >________________________________ > > From: 陈抒 <csf...@gm...> > >To: Artyom Beilis <art...@ya...>; > cpp...@li... > >Sent: Saturday, September 1, 2012 10:05 AM > >Subject: Re: [Cppcms-users] Compile error: traits is not a template > > > > > >Thank you. But I see new error. > >groups.h file: > > > > > >#ifndef __GROUPS_H > >#define __GROUPS_H > > > > > >#include <vector> > >#include <boost/shared_ptr.hpp> > >#include "group.h" > > > > > >namespace kaimei{ > > > > > > class groups{ > > public: > > typedef std::vector<boost::shared_ptr<group> >::iterator iterator; > > typedef std::vector<boost::shared_ptr<group> >::const_iterator > const_iterator; > > > > > > void add(boost::shared_ptr<group> g); > > > > > > bool empty() const; > > > > > > unsigned int size() const; > > > > > > std::string json_string() const; > > > > friend class cppcms::json::traits<kaimei::groups>; > > > > > > private: > > std::vector<boost::shared_ptr<kaimei::group> > values_; > > }; > > > > > >} > > > > > >namespace cppcms { > > namespace json { > > > > > > template<> > > struct traits<kaimei::groups> { > > > > > > static void set(value &v, kaimei::groups const& in) { > >v.set("size", in.size()); > >v.set("values", in.values_); > > } > > }; > > > > > > } > >} > > > > > >#endif > > > > > > > > > >error message: > > 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, > ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, > ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, > ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, > ../../src/view/login.cpp, ../../src/view/group_management.cpp > >[ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o > >In file included from > /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, > > from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, > > from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: > >/usr/include/cppcms/json.h: In member function ‘void > cppcms::json::value::set_value(const T&) [with T = > boost::shared_ptr<kaimei::group>]’: > >/usr/include/cppcms/json.h:604:5: instantiated from ‘static void > cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const > std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ > >/usr/include/cppcms/json.h:247:4: instantiated from ‘void > cppcms::json::value::set_value(const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > >/usr/include/cppcms/json.h:316:4: instantiated from > ‘cppcms::json::value::value(const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > >/usr/include/cppcms/json.h:352:4: instantiated from ‘void > cppcms::json::value::set(const char*, const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > >/home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated > from here > >/usr/include/cppcms/json.h:247:4: error: incomplete type > ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested > name specifier > >make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 > >make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 > >make: *** [all] Error 2 > > > > > >陈抒 > >Best regards > >http://blog.csdn.net/sheismylife > > > > > > > >On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> > wrote: > > > >> > >> > >>>But I got error when compiling another class. It has group.h and > group.cpp file. > >>> > >>> > >>>#ifndef __GROUP_H > >>>#define __GROUP_H > >>> > >>> > >>>#include <string> > >>> > >>> > >>>namespace kaimei{ > >>>... > >> > >>} > >>> > >>> > >>>namespace cppcms { > >>> namespace json { > >>> template<> > >>> struct traits<kaimei::group> { > >>>... > >>> } > >>> } > >>>} > >>> > >>> > >>> > >>> [snip] > >> > >>> > >>>I am not good at template programming. Why did this happen? > >>> > >> > >>You can't specialize undefined struct - you need to include > <cppcms/json.h> > >>header. It provides the original traits struct and than you specialize > it for > >>your type of class > >> > >> > >> > >>> > >>>陈抒 > >>>Best regards > >>>http://blog.csdn.net/sheismylife > >>> > >> > >>Regards, > >>Artyom > >> > >> > > >>------------------------------------------------------------------------------ > >>Live Security Virtual Conference > >>Exclusive live event will cover all the ways today's security and > >>threat landscape has changed and how IT managers can respond. Discussions > >>will include endpoint security, mobile security and the latest in malware > >>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > >>_______________________________________________ > >>Cppcms-users mailing list > >>Cpp...@li... > >>https://lists.sourceforge.net/lists/listinfo/cppcms-users > >> > > > > >------------------------------------------------------------------------------ > >Live Security Virtual Conference > >Exclusive live event will cover all the ways today's security and > >threat landscape has changed and how IT managers can respond. Discussions > >will include endpoint security, mobile security and the latest in malware > >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > >_______________________________________________ > >Cppcms-users mailing list > >Cpp...@li... > >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-09-01 09:41:48
|
Because shared_ptr<group> is not specialized for traits... You need manually create an array and sets its memebers.i.e Something like that: cppcms::json::array &a=v.at("values",cppcms::json::array()); a.resize(in.values_.size()); for(size_t i = 0;i<in.values_.size();i++) a[i]=*in.values_[i]; Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: 陈抒 <csf...@gm...> >To: Artyom Beilis <art...@ya...>; cpp...@li... >Sent: Saturday, September 1, 2012 10:05 AM >Subject: Re: [Cppcms-users] Compile error: traits is not a template > > >Thank you. But I see new error. >groups.h file: > > >#ifndef __GROUPS_H >#define __GROUPS_H > > >#include <vector> >#include <boost/shared_ptr.hpp> >#include "group.h" > > >namespace kaimei{ > > > class groups{ > public: > typedef std::vector<boost::shared_ptr<group> >::iterator iterator; > typedef std::vector<boost::shared_ptr<group> >::const_iterator const_iterator; > > > void add(boost::shared_ptr<group> g); > > > bool empty() const; > > > unsigned int size() const; > > > std::string json_string() const; > > friend class cppcms::json::traits<kaimei::groups>; > > > private: > std::vector<boost::shared_ptr<kaimei::group> > values_; > }; > > >} > > >namespace cppcms { > namespace json { > > > template<> > struct traits<kaimei::groups> { > > > static void set(value &v, kaimei::groups const& in) { >v.set("size", in.size()); >v.set("values", in.values_); > } > }; > > > } >} > > >#endif > > > > >error message: > 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, ../../src/view/login.cpp, ../../src/view/group_management.cpp >[ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o >In file included from /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, > from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, > from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: >/usr/include/cppcms/json.h: In member function ‘void cppcms::json::value::set_value(const T&) [with T = boost::shared_ptr<kaimei::group>]’: >/usr/include/cppcms/json.h:604:5: instantiated from ‘static void cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ >/usr/include/cppcms/json.h:247:4: instantiated from ‘void cppcms::json::value::set_value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >/usr/include/cppcms/json.h:316:4: instantiated from ‘cppcms::json::value::value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >/usr/include/cppcms/json.h:352:4: instantiated from ‘void cppcms::json::value::set(const char*, const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ >/home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated from here >/usr/include/cppcms/json.h:247:4: error: incomplete type ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested name specifier >make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 >make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 >make: *** [all] Error 2 > > >陈抒 >Best regards >http://blog.csdn.net/sheismylife > > > >On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> wrote: > >> >> >>>But I got error when compiling another class. It has group.h and group.cpp file. >>> >>> >>>#ifndef __GROUP_H >>>#define __GROUP_H >>> >>> >>>#include <string> >>> >>> >>>namespace kaimei{ >>>... >> >>} >>> >>> >>>namespace cppcms { >>> namespace json { >>> template<> >>> struct traits<kaimei::group> { >>>... >>> } >>> } >>>} >>> >>> >>> >>> [snip] >> >>> >>>I am not good at template programming. Why did this happen? >>> >> >>You can't specialize undefined struct - you need to include <cppcms/json.h> >>header. It provides the original traits struct and than you specialize it for >>your type of class >> >> >> >>> >>>陈抒 >>>Best regards >>>http://blog.csdn.net/sheismylife >>> >> >>Regards, >>Artyom >> >> >>------------------------------------------------------------------------------ >>Live Security Virtual Conference >>Exclusive live event will cover all the ways today's security and >>threat landscape has changed and how IT managers can respond. Discussions >>will include endpoint security, mobile security and the latest in malware >>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: 陈抒 <csf...@gm...> - 2012-09-01 07:07:19
|
json.h was added into group.h groups.h include group.h 陈抒 Best regards http://blog.csdn.net/sheismylife On Sat, Sep 1, 2012 at 3:05 PM, 陈抒 <csf...@gm...> wrote: > Thank you. But I see new error. > groups.h file: > > #ifndef __GROUPS_H > #define __GROUPS_H > > #include <vector> > #include <boost/shared_ptr.hpp> > #include "group.h" > > namespace kaimei{ > > class groups{ > public: > typedef std::vector<boost::shared_ptr<group> >::iterator iterator; > typedef std::vector<boost::shared_ptr<group> >::const_iterator > const_iterator; > > void add(boost::shared_ptr<group> g); > > bool empty() const; > > unsigned int size() const; > > std::string json_string() const; > > friend class cppcms::json::traits<kaimei::groups>; > > private: > std::vector<boost::shared_ptr<kaimei::group> > values_; > }; > > } > > namespace cppcms { > namespace json { > > template<> > struct traits<kaimei::groups> { > > static void set(value &v, kaimei::groups const& in) { > v.set("size", in.size()); > v.set("values", in.values_); > } > }; > > } > } > > #endif > > > error message: > 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, > ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, > ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, > ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, > ../../src/view/login.cpp, ../../src/view/group_management.cpp > [ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o > In file included from /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, > from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, > from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: > /usr/include/cppcms/json.h: In member function ‘void > cppcms::json::value::set_value(const T&) [with T = > boost::shared_ptr<kaimei::group>]’: > /usr/include/cppcms/json.h:604:5: instantiated from ‘static void > cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const > std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ > /usr/include/cppcms/json.h:247:4: instantiated from ‘void > cppcms::json::value::set_value(const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > /usr/include/cppcms/json.h:316:4: instantiated from > ‘cppcms::json::value::value(const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > /usr/include/cppcms/json.h:352:4: instantiated from ‘void > cppcms::json::value::set(const char*, const T&) [with T = > std::vector<boost::shared_ptr<kaimei::group> >]’ > /home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated > from here > /usr/include/cppcms/json.h:247:4: error: incomplete type > ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested > name specifier > make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 > make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 > make: *** [all] Error 2 > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> wrote: > >> > >> >> >But I got error when compiling another class. It has group.h and >> group.cpp file. >> > >> > >> >#ifndef __GROUP_H >> >#define __GROUP_H >> > >> > >> >#include <string> >> > >> > >> >namespace kaimei{ >> >... >> } >> > >> > >> >namespace cppcms { >> > namespace json { >> > template<> >> > struct traits<kaimei::group> { >> >... >> > } >> > } >> >} >> > >> > >> > >> > [snip] >> > >> >I am not good at template programming. Why did this happen? >> > >> >> You can't specialize undefined struct - you need to include >> <cppcms/json.h> >> header. It provides the original traits struct and than you specialize it >> for >> your type of class >> >> >> > >> >陈抒 >> >Best regards >> >http://blog.csdn.net/sheismylife >> > >> >> Regards, >> Artyom >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > |
From: 陈抒 <csf...@gm...> - 2012-09-01 07:06:05
|
Thank you. But I see new error. groups.h file: #ifndef __GROUPS_H #define __GROUPS_H #include <vector> #include <boost/shared_ptr.hpp> #include "group.h" namespace kaimei{ class groups{ public: typedef std::vector<boost::shared_ptr<group> >::iterator iterator; typedef std::vector<boost::shared_ptr<group> >::const_iterator const_iterator; void add(boost::shared_ptr<group> g); bool empty() const; unsigned int size() const; std::string json_string() const; friend class cppcms::json::traits<kaimei::groups>; private: std::vector<boost::shared_ptr<kaimei::group> > values_; }; } namespace cppcms { namespace json { template<> struct traits<kaimei::groups> { static void set(value &v, kaimei::groups const& in) { v.set("size", in.size()); v.set("values", in.values_); } }; } } #endif error message: 3%] Generating ../../src/view/welcome.cpp, ../../src/view/home.cpp, ../../src/view/gprs_message.cpp, ../../src/view/gprs_manager.cpp, ../../src/view/gprs_password.cpp, ../../src/view/gprs_log.cpp, ../../src/view/register_client.cpp, ../../src/view/gprsConfig.cpp, ../../src/view/login.cpp, ../../src/view/group_management.cpp [ 6%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o In file included from /home/chenshu/work/kaimei/cppweb/include/group.h:5:0, from /home/chenshu/work/kaimei/cppweb/include/groups.h:6, from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: /usr/include/cppcms/json.h: In member function ‘void cppcms::json::value::set_value(const T&) [with T = boost::shared_ptr<kaimei::group>]’: /usr/include/cppcms/json.h:604:5: instantiated from ‘static void cppcms::json::traits<std::vector<T> >::set(cppcms::json::value&, const std::vector<T>&) [with T = boost::shared_ptr<kaimei::group>]’ /usr/include/cppcms/json.h:247:4: instantiated from ‘void cppcms::json::value::set_value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ /usr/include/cppcms/json.h:316:4: instantiated from ‘cppcms::json::value::value(const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ /usr/include/cppcms/json.h:352:4: instantiated from ‘void cppcms::json::value::set(const char*, const T&) [with T = std::vector<boost::shared_ptr<kaimei::group> >]’ /home/chenshu/work/kaimei/cppweb/include/groups.h:39:28: instantiated from here /usr/include/cppcms/json.h:247:4: error: incomplete type ‘cppcms::json::traits<boost::shared_ptr<kaimei::group> >’ used in nested name specifier make[2]: *** [bin/CMakeFiles/cppweb.dir/groups.cpp.o] Error 1 make[1]: *** [bin/CMakeFiles/cppweb.dir/all] Error 2 make: *** [all] Error 2 陈抒 Best regards http://blog.csdn.net/sheismylife On Sat, Sep 1, 2012 at 2:34 PM, Artyom Beilis <art...@ya...> wrote: > > > > >But I got error when compiling another class. It has group.h and > group.cpp file. > > > > > >#ifndef __GROUP_H > >#define __GROUP_H > > > > > >#include <string> > > > > > >namespace kaimei{ > >... > } > > > > > >namespace cppcms { > > namespace json { > > template<> > > struct traits<kaimei::group> { > >... > > } > > } > >} > > > > > > > > [snip] > > > >I am not good at template programming. Why did this happen? > > > > You can't specialize undefined struct - you need to include <cppcms/json.h> > header. It provides the original traits struct and than you specialize it > for > your type of class > > > > > >陈抒 > >Best regards > >http://blog.csdn.net/sheismylife > > > > Regards, > Artyom > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-09-01 06:52:43
|
Also don't forget to register to the list so I do not have to moderate it. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ----- Original Message ----- > From: Artyom Beilis <art...@ya...> > To: "cpp...@li..." <cpp...@li...> > Cc: > Sent: Saturday, September 1, 2012 9:46 AM > Subject: Re: [Cppcms-users] cppblog not work > > You either misconfigured the location of the skins (views.paths) > or the cppblog code was build without -rdynamic/--export-dynamic build option > by default. > > I think this is the second (I hadn't tested cppblog of freebsd). > > Try to add > > > -DCMAKE_CXX_LINK_FLAGS=-rdynamic > > Option to cmake command and than run make once again. > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > > ----- Original Message ----- >> From: Vyacheslav Biruk <ma...@ch...> >> To: cpp...@li... >> Cc: >> Sent: Friday, August 31, 2012 5:17 PM >> Subject: [Cppcms-users] cppblog not work >> >> Hello >> >> FreeBSD 8.3-RELEASE-p4 i386 >> cppblog_0.1.0 >> cppcms-1.0.2 and cppcms-1.0.0 >> cppdb-0.3.1 >> Python 2.7.3 >> cmake version 2.8.8 >> PCRE version 8.31 2012-07-06 >> gcc (GCC) 4.2.2 20070831 prerelease [FreeBSD] >> icu-4.8.1.1_1 >> >> after the configuration to any request I get the following error: >> 2012-08-31 13:42:40; cppcms, error: Caught exception >> [cppcms::views::generator: an attempt to use content if invalid type] >> (http_context.cpp:139) >> >> What's the problem? >> Where to look? >> What to do? >> >> -- >> Best regards, >> magic >> >> > ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-09-01 06:46:26
|
You either misconfigured the location of the skins (views.paths) or the cppblog code was build without -rdynamic/--export-dynamic build option by default. I think this is the second (I hadn't tested cppblog of freebsd). Try to add -DCMAKE_CXX_LINK_FLAGS=-rdynamic Option to cmake command and than run make once again. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ----- Original Message ----- > From: Vyacheslav Biruk <ma...@ch...> > To: cpp...@li... > Cc: > Sent: Friday, August 31, 2012 5:17 PM > Subject: [Cppcms-users] cppblog not work > > Hello > > FreeBSD 8.3-RELEASE-p4 i386 > cppblog_0.1.0 > cppcms-1.0.2 and cppcms-1.0.0 > cppdb-0.3.1 > Python 2.7.3 > cmake version 2.8.8 > PCRE version 8.31 2012-07-06 > gcc (GCC) 4.2.2 20070831 prerelease [FreeBSD] > icu-4.8.1.1_1 > > after the configuration to any request I get the following error: > 2012-08-31 13:42:40; cppcms, error: Caught exception > [cppcms::views::generator: an attempt to use content if invalid type] > (http_context.cpp:139) > > What's the problem? > Where to look? > What to do? > > -- > Best regards, > magic > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-09-01 06:34:34
|
> >But I got error when compiling another class. It has group.h and group.cpp file. > > >#ifndef __GROUP_H >#define __GROUP_H > > >#include <string> > > >namespace kaimei{ >... } > > >namespace cppcms { > namespace json { > template<> > struct traits<kaimei::group> { >... > } > } >} > > > > [snip] > >I am not good at template programming. Why did this happen? > You can't specialize undefined struct - you need to include <cppcms/json.h> header. It provides the original traits struct and than you specialize it for your type of class > >陈抒 >Best regards >http://blog.csdn.net/sheismylife > Regards, Artyom |
From: 陈抒 <csf...@gm...> - 2012-08-31 15:59:11
|
Forgot another class: groups . It contains several group objects in vector. Here is groups.h content: #ifndef __GROUPS_H #define __GROUPS_H #include <vector> #include <boost/shared_ptr.hpp> #include "group.h" class groups{ public: typedef std::vector<boost::shared_ptr<group> >::iterator iterator; typedef std::vector<boost::shared_ptr<group> >::const_iterator const_iterator; void add(boost::shared_ptr<group> g); bool empty() const; unsigned int size() const; std::string json_string() const; friend cppcms::json::traits<kaimei::group>; private: std::vector<boost::shared_ptr<group> > values_; }; namespace cppcms { namespace json { template<> struct traits<kaimei::groups> { static void set(value &v, kaimei::groups const& in) { v.set("size", groups.size()); v.set("values", in.values_); } }; } } #endif 陈抒 Best regards http://blog.csdn.net/sheismylife On Fri, Aug 31, 2012 at 11:36 PM, 陈抒 <csf...@gm...> wrote: > I have a correct class with no compilation error. All codes in response.h: > #ifndef __RESPONSE_H > #define __RESPONSE_H > > namespace kaimei{ > class response { > public: > enum > {OK=0,SAVE_EMAIL_ERROR=1,CHANGE_PWD_ERROR=2,LOGIN_ERROR=3,CREATE_ACCOUNT_ERROR=4, > SAVE_MESSAGE_ERROR=5,CHANGE_LANGUAGE_ERROR=6,NONE_CONTENT=7,LOAD_DISPLAY_ERROR=8, > > NONE_USER_ID=9,GET_MESSAGE_LOG_ERROR=10,QUIT_ERROR=11,NONE_ADMIN=12,BIND_ERROR=13, > UPDATE_DESCRIPTION_ERROR=14,UNBIND_ERROR=15,LOAD_GROUPS_ERROR=16,UPDATE_GROUP_NAME_ERROR=17 > }; > int status; > string message; > string value; > }; > } > > namespace cppcms { > namespace json { > > template<> > struct traits<kaimei::response> { > > static void set(value &v, kaimei::response const& in) { > v.set("status", in.status); > v.set("message", in.message); > v.set("value", in.value); > } > }; > > } > } > > #endif > > > But I got error when compiling another class. It has group.h and group.cpp > file. > > #ifndef __GROUP_H > #define __GROUP_H > > #include <string> > > namespace kaimei{ > class group { > public: > group(); > > std::string id; > std::string description; > std::string name; > int device_number; > > std::string json_string() const; > }; > } > > namespace cppcms { > namespace json { > > template<> > struct traits<kaimei::group> { > > static void set(value &v, kaimei::group const& in) { > v.set("id", in.id); > v.set("description", in.description); > v.set("name", in.name); > v.set("deviceNumber", in.device_number); > } > }; > > } > } > > > #endif > > Error output: > > [ 3%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o > In file included from > /home/chenshu/work/kaimei/cppweb/include/groups.h:6:0, > from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: > /home/chenshu/work/kaimei/cppweb/include/group.h:24:14: error: ‘traits’ is > not a template > /home/chenshu/work/kaimei/cppweb/include/group.h:24:36: error: explicit > specialization of non-template ‘cppcms::json::traits’ > /home/chenshu/work/kaimei/cppweb/include/group.h:26:23: error: ‘value’ has > not been declared > /home/chenshu/work/kaimei/cppweb/include/group.h: In static member > function ‘static void cppcms::json::traits::set(int&, const > kaimei::group&)’: > /home/chenshu/work/kaimei/cppweb/include/group.h:27:4: error: request for > member ‘set’ in ‘v’, which is of non-class type ‘int’ > /home/chenshu/work/kaimei/cppweb/include/group.h:28:4: error: request for > member ‘set’ in ‘v’, which is of non-class type ‘int’ > /home/chenshu/work/kaimei/cppweb/include/group.h:29:4: error: request for > member ‘set’ in ‘v’, which is of non-class type ‘int’ > /home/chenshu/work/kaimei/cppweb/include/group.h:30:4: error: request for > member ‘set’ in ‘v’, which is of non-class type ‘int’ > > > I am not good at template programming. Why did this happen? > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > |
From: 陈抒 <csf...@gm...> - 2012-08-31 15:37:14
|
I have a correct class with no compilation error. All codes in response.h: #ifndef __RESPONSE_H #define __RESPONSE_H namespace kaimei{ class response { public: enum {OK=0,SAVE_EMAIL_ERROR=1,CHANGE_PWD_ERROR=2,LOGIN_ERROR=3,CREATE_ACCOUNT_ERROR=4, SAVE_MESSAGE_ERROR=5,CHANGE_LANGUAGE_ERROR=6,NONE_CONTENT=7,LOAD_DISPLAY_ERROR=8, NONE_USER_ID=9,GET_MESSAGE_LOG_ERROR=10,QUIT_ERROR=11,NONE_ADMIN=12,BIND_ERROR=13, UPDATE_DESCRIPTION_ERROR=14,UNBIND_ERROR=15,LOAD_GROUPS_ERROR=16,UPDATE_GROUP_NAME_ERROR=17 }; int status; string message; string value; }; } namespace cppcms { namespace json { template<> struct traits<kaimei::response> { static void set(value &v, kaimei::response const& in) { v.set("status", in.status); v.set("message", in.message); v.set("value", in.value); } }; } } #endif But I got error when compiling another class. It has group.h and group.cpp file. #ifndef __GROUP_H #define __GROUP_H #include <string> namespace kaimei{ class group { public: group(); std::string id; std::string description; std::string name; int device_number; std::string json_string() const; }; } namespace cppcms { namespace json { template<> struct traits<kaimei::group> { static void set(value &v, kaimei::group const& in) { v.set("id", in.id); v.set("description", in.description); v.set("name", in.name); v.set("deviceNumber", in.device_number); } }; } } #endif Error output: [ 3%] Building CXX object bin/CMakeFiles/cppweb.dir/groups.cpp.o In file included from /home/chenshu/work/kaimei/cppweb/include/groups.h:6:0, from /home/chenshu/work/kaimei/cppweb/src/groups.cpp:1: /home/chenshu/work/kaimei/cppweb/include/group.h:24:14: error: ‘traits’ is not a template /home/chenshu/work/kaimei/cppweb/include/group.h:24:36: error: explicit specialization of non-template ‘cppcms::json::traits’ /home/chenshu/work/kaimei/cppweb/include/group.h:26:23: error: ‘value’ has not been declared /home/chenshu/work/kaimei/cppweb/include/group.h: In static member function ‘static void cppcms::json::traits::set(int&, const kaimei::group&)’: /home/chenshu/work/kaimei/cppweb/include/group.h:27:4: error: request for member ‘set’ in ‘v’, which is of non-class type ‘int’ /home/chenshu/work/kaimei/cppweb/include/group.h:28:4: error: request for member ‘set’ in ‘v’, which is of non-class type ‘int’ /home/chenshu/work/kaimei/cppweb/include/group.h:29:4: error: request for member ‘set’ in ‘v’, which is of non-class type ‘int’ /home/chenshu/work/kaimei/cppweb/include/group.h:30:4: error: request for member ‘set’ in ‘v’, which is of non-class type ‘int’ I am not good at template programming. Why did this happen? 陈抒 Best regards http://blog.csdn.net/sheismylife |
From: Vyacheslav B. <ma...@ch...> - 2012-08-31 14:43:46
|
Hello FreeBSD 8.3-RELEASE-p4 i386 cppblog_0.1.0 cppcms-1.0.2 and cppcms-1.0.0 cppdb-0.3.1 Python 2.7.3 cmake version 2.8.8 PCRE version 8.31 2012-07-06 gcc (GCC) 4.2.2 20070831 prerelease [FreeBSD] icu-4.8.1.1_1 after the configuration to any request I get the following error: 2012-08-31 13:42:40; cppcms, error: Caught exception [cppcms::views::generator: an attempt to use content if invalid type] (http_context.cpp:139) What's the problem? Where to look? What to do? -- Best regards, magic |
From: Artyom B. <art...@ya...> - 2012-08-29 17:59:31
|
Hello to All CppCMS Users, Note, the Sourceforge had moved to the new system, if you are using svn trunk versions, please checkout the code once again from the new location: The new location of the Read Only repository is: HTTP: http://svn.code.sf.net/p/cppcms/code/framework/trunk SVN: svn://svn.code.sf.net/p/cppcms/code/framework/trunk For details see: https://sourceforge.net/p/cppcms/code/ Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: Artyom B. <art...@ya...> - 2012-08-28 10:25:56
|
Server-Sent Events in CppCMS Trunk: http://blog.cppcms.com/post/110 Enjoy Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: Christian G. <chr...@gm...> - 2012-08-20 10:58:37
|
ahh... nice to know :) --- Christian Gmeiner, MSc 2012/8/20 Artyom Beilis <art...@ya...>: > You have a small icon of information (i) there: > > https://sourceforge.net/projects/cppcms/files/cppcms/1.0.2/ > > Click on it and you'll see sha1 and md5 checksums > > > 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: cpp...@li... >> Cc: Artyom Beilis <art...@ya...> >> Sent: Monday, August 20, 2012 11:14 AM >> Subject: Re: [Cppcms-users] CppCMS 1.0.2 - Bug fix release >> >> Hi, >> >> can you provide checksums (md5, sha1 ...) for the tar.bz2 files? >> >> thanks >> --- >> Christian Gmeiner, MSc >> >> >> 2012/8/14 Michał Piotrowski <mk...@gm...>: >>> 2012/8/14 Artyom Beilis <art...@ya...>: >>>>>> >>>> >>>>>> The deb and rpm files published for x86 and x86_64 >> architectures for for >>>>> following distributions: >>>>>> >>>>>> Ubuntu: oneiric, precise (11.10 and 12.04LTS) >>>>>> Debian: squeezy (6.0) >>>>>> CentOS: 6 >>>>>> Fedora: 16 and 17 >>>>> >>>>> FYI I get this error on F17 >>>>> >>>>> ERROR with transaction check vs depsolve: >>>>> libicudata.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 >>>>> libicui18n.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 >>>>> libicuuc.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 >>>>> libicudata.so.46()(64bit) is needed by >> cppcms-tools-1.0.2-37.1.x86_64 >>>>> libicui18n.so.46()(64bit) is needed by >> cppcms-tools-1.0.2-37.1.x86_64 >>>>> libicuuc.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 >>>>> Please report this error in >>>>> >> https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=rawhide&component=yum >>>>> ** Found 6 pre-existing rpmdb problem(s), 'yum check' >> output follows: >>>>> cppcms-tools-1.0.1-24.1.x86_64 has missing requires of >> libicudata.so.46()(64bit) >>>>> cppcms-tools-1.0.1-24.1.x86_64 has missing requires of >> libicui18n.so.46()(64bit) >>>>> cppcms-tools-1.0.1-24.1.x86_64 has missing requires of >> libicuuc.so.46()(64bit) >>>>> libcppcms-1.0.1-24.1.x86_64 has missing requires of >> libicudata.so.46()(64bit) >>>>> libcppcms-1.0.1-24.1.x86_64 has missing requires of >> libicui18n.so.46()(64bit) >>>>> libcppcms-1.0.1-24.1.x86_64 has missing requires of >> libicuuc.so.46()(64bit) >>>>> >>>> >>>> First of all what command have you run and what did you try to install >>>> and what have you had installed. >>>> >>>> It seems that you have libcppcms-1.0.1 either installed from F16 repos >>>> and seems that something collides. Maybe you do not upgrade all >> packages? >>>> >>>> >>>> Have you tryed to remove libcppcms, libcppcms-devel and cppcms-tools >> and install >>>> the latest packages? >>>> >>>> Are you using correct repo? >>>> >>> >>> I checked my yum repo conf and it turned out that I used repo >>> for Fedora 16 on Fedora 17. >>> >>> Sorry for the noise. >>> >>> >>>> >>>> >>>> >>>> I do not that familiar with yum errors but it seems like some >> misconfiguration. >>>> finally the only difference in the spec file that these RPMs were >> created >>>> withe is a version number. >>>> >>>> Artyom Beilis >>>> -------------- >>>> CppCMS - C++ Web Framework: http://cppcms.com/ >>>> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >>>> >>>> >> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. >> Discussions >>>> will include endpoint security, mobile security and the latest in >> malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Cppcms-users mailing list >>>> Cpp...@li... >>>> https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>> >>> >>> -- >>> Best regards, >>> Michal >>> >>> http://eventhorizon.pl/ >>> https://getactive.pl/ >>> >>> >> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Cppcms-users mailing list >>> Cpp...@li... >>> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom B. <art...@ya...> - 2012-08-20 08:40:54
|
You have a small icon of information (i) there: https://sourceforge.net/projects/cppcms/files/cppcms/1.0.2/ Click on it and you'll see sha1 and md5 checksums 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: cpp...@li... > Cc: Artyom Beilis <art...@ya...> > Sent: Monday, August 20, 2012 11:14 AM > Subject: Re: [Cppcms-users] CppCMS 1.0.2 - Bug fix release > > Hi, > > can you provide checksums (md5, sha1 ...) for the tar.bz2 files? > > thanks > --- > Christian Gmeiner, MSc > > > 2012/8/14 Michał Piotrowski <mk...@gm...>: >> 2012/8/14 Artyom Beilis <art...@ya...>: >>>>> >>> >>>>> The deb and rpm files published for x86 and x86_64 > architectures for for >>>> following distributions: >>>>> >>>>> Ubuntu: oneiric, precise (11.10 and 12.04LTS) >>>>> Debian: squeezy (6.0) >>>>> CentOS: 6 >>>>> Fedora: 16 and 17 >>>> >>>> FYI I get this error on F17 >>>> >>>> ERROR with transaction check vs depsolve: >>>> libicudata.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 >>>> libicui18n.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 >>>> libicuuc.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 >>>> libicudata.so.46()(64bit) is needed by > cppcms-tools-1.0.2-37.1.x86_64 >>>> libicui18n.so.46()(64bit) is needed by > cppcms-tools-1.0.2-37.1.x86_64 >>>> libicuuc.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 >>>> Please report this error in >>>> > https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=rawhide&component=yum >>>> ** Found 6 pre-existing rpmdb problem(s), 'yum check' > output follows: >>>> cppcms-tools-1.0.1-24.1.x86_64 has missing requires of > libicudata.so.46()(64bit) >>>> cppcms-tools-1.0.1-24.1.x86_64 has missing requires of > libicui18n.so.46()(64bit) >>>> cppcms-tools-1.0.1-24.1.x86_64 has missing requires of > libicuuc.so.46()(64bit) >>>> libcppcms-1.0.1-24.1.x86_64 has missing requires of > libicudata.so.46()(64bit) >>>> libcppcms-1.0.1-24.1.x86_64 has missing requires of > libicui18n.so.46()(64bit) >>>> libcppcms-1.0.1-24.1.x86_64 has missing requires of > libicuuc.so.46()(64bit) >>>> >>> >>> First of all what command have you run and what did you try to install >>> and what have you had installed. >>> >>> It seems that you have libcppcms-1.0.1 either installed from F16 repos >>> and seems that something collides. Maybe you do not upgrade all > packages? >>> >>> >>> Have you tryed to remove libcppcms, libcppcms-devel and cppcms-tools > and install >>> the latest packages? >>> >>> Are you using correct repo? >>> >> >> I checked my yum repo conf and it turned out that I used repo >> for Fedora 16 on Fedora 17. >> >> Sorry for the noise. >> >> >>> >>> >>> >>> I do not that familiar with yum errors but it seems like some > misconfiguration. >>> finally the only difference in the spec file that these RPMs were > created >>> withe is a version number. >>> >>> Artyom Beilis >>> -------------- >>> CppCMS - C++ Web Framework: http://cppcms.com/ >>> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >>> >>> > ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. > Discussions >>> will include endpoint security, mobile security and the latest in > malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Cppcms-users mailing list >>> Cpp...@li... >>> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> -- >> Best regards, >> Michal >> >> http://eventhorizon.pl/ >> https://getactive.pl/ >> >> > ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Christian G. <chr...@gm...> - 2012-08-20 08:14:39
|
Hi, can you provide checksums (md5, sha1 ...) for the tar.bz2 files? thanks --- Christian Gmeiner, MSc 2012/8/14 Michał Piotrowski <mk...@gm...>: > 2012/8/14 Artyom Beilis <art...@ya...>: >>>> >> >>>> The deb and rpm files published for x86 and x86_64 architectures for for >>> following distributions: >>>> >>>> Ubuntu: oneiric, precise (11.10 and 12.04LTS) >>>> Debian: squeezy (6.0) >>>> CentOS: 6 >>>> Fedora: 16 and 17 >>> >>> FYI I get this error on F17 >>> >>> ERROR with transaction check vs depsolve: >>> libicudata.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 >>> libicui18n.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 >>> libicuuc.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 >>> libicudata.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 >>> libicui18n.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 >>> libicuuc.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 >>> Please report this error in >>> https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=rawhide&component=yum >>> ** Found 6 pre-existing rpmdb problem(s), 'yum check' output follows: >>> cppcms-tools-1.0.1-24.1.x86_64 has missing requires of libicudata.so.46()(64bit) >>> cppcms-tools-1.0.1-24.1.x86_64 has missing requires of libicui18n.so.46()(64bit) >>> cppcms-tools-1.0.1-24.1.x86_64 has missing requires of libicuuc.so.46()(64bit) >>> libcppcms-1.0.1-24.1.x86_64 has missing requires of libicudata.so.46()(64bit) >>> libcppcms-1.0.1-24.1.x86_64 has missing requires of libicui18n.so.46()(64bit) >>> libcppcms-1.0.1-24.1.x86_64 has missing requires of libicuuc.so.46()(64bit) >>> >> >> First of all what command have you run and what did you try to install >> and what have you had installed. >> >> It seems that you have libcppcms-1.0.1 either installed from F16 repos >> and seems that something collides. Maybe you do not upgrade all packages? >> >> >> Have you tryed to remove libcppcms, libcppcms-devel and cppcms-tools and install >> the latest packages? >> >> Are you using correct repo? >> > > I checked my yum repo conf and it turned out that I used repo > for Fedora 16 on Fedora 17. > > Sorry for the noise. > > >> >> >> >> I do not that familiar with yum errors but it seems like some misconfiguration. >> finally the only difference in the spec file that these RPMs were created >> withe is a version number. >> >> Artyom Beilis >> -------------- >> CppCMS - C++ Web Framework: http://cppcms.com/ >> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > -- > Best regards, > Michal > > http://eventhorizon.pl/ > https://getactive.pl/ > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Michał P. <mk...@gm...> - 2012-08-14 20:40:48
|
2012/8/14 Artyom Beilis <art...@ya...>: >>> > >>> The deb and rpm files published for x86 and x86_64 architectures for for >> following distributions: >>> >>> Ubuntu: oneiric, precise (11.10 and 12.04LTS) >>> Debian: squeezy (6.0) >>> CentOS: 6 >>> Fedora: 16 and 17 >> >> FYI I get this error on F17 >> >> ERROR with transaction check vs depsolve: >> libicudata.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 >> libicui18n.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 >> libicuuc.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 >> libicudata.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 >> libicui18n.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 >> libicuuc.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 >> Please report this error in >> https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=rawhide&component=yum >> ** Found 6 pre-existing rpmdb problem(s), 'yum check' output follows: >> cppcms-tools-1.0.1-24.1.x86_64 has missing requires of libicudata.so.46()(64bit) >> cppcms-tools-1.0.1-24.1.x86_64 has missing requires of libicui18n.so.46()(64bit) >> cppcms-tools-1.0.1-24.1.x86_64 has missing requires of libicuuc.so.46()(64bit) >> libcppcms-1.0.1-24.1.x86_64 has missing requires of libicudata.so.46()(64bit) >> libcppcms-1.0.1-24.1.x86_64 has missing requires of libicui18n.so.46()(64bit) >> libcppcms-1.0.1-24.1.x86_64 has missing requires of libicuuc.so.46()(64bit) >> > > First of all what command have you run and what did you try to install > and what have you had installed. > > It seems that you have libcppcms-1.0.1 either installed from F16 repos > and seems that something collides. Maybe you do not upgrade all packages? > > > Have you tryed to remove libcppcms, libcppcms-devel and cppcms-tools and install > the latest packages? > > Are you using correct repo? > I checked my yum repo conf and it turned out that I used repo for Fedora 16 on Fedora 17. Sorry for the noise. > > > > I do not that familiar with yum errors but it seems like some misconfiguration. > finally the only difference in the spec file that these RPMs were created > withe is a version number. > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users -- Best regards, Michal http://eventhorizon.pl/ https://getactive.pl/ |
From: Artyom B. <art...@ya...> - 2012-08-14 20:03:53
|
>> >> The deb and rpm files published for x86 and x86_64 architectures for for > following distributions: >> >> Ubuntu: oneiric, precise (11.10 and 12.04LTS) >> Debian: squeezy (6.0) >> CentOS: 6 >> Fedora: 16 and 17 > > FYI I get this error on F17 > > ERROR with transaction check vs depsolve: > libicudata.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 > libicui18n.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 > libicuuc.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 > libicudata.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 > libicui18n.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 > libicuuc.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 > Please report this error in > https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=rawhide&component=yum > ** Found 6 pre-existing rpmdb problem(s), 'yum check' output follows: > cppcms-tools-1.0.1-24.1.x86_64 has missing requires of libicudata.so.46()(64bit) > cppcms-tools-1.0.1-24.1.x86_64 has missing requires of libicui18n.so.46()(64bit) > cppcms-tools-1.0.1-24.1.x86_64 has missing requires of libicuuc.so.46()(64bit) > libcppcms-1.0.1-24.1.x86_64 has missing requires of libicudata.so.46()(64bit) > libcppcms-1.0.1-24.1.x86_64 has missing requires of libicui18n.so.46()(64bit) > libcppcms-1.0.1-24.1.x86_64 has missing requires of libicuuc.so.46()(64bit) > First of all what command have you run and what did you try to install and what have you had installed. It seems that you have libcppcms-1.0.1 either installed from F16 repos and seems that something collides. Maybe you do not upgrade all packages? Have you tryed to remove libcppcms, libcppcms-devel and cppcms-tools and install the latest packages? Are you using correct repo? I do not that familiar with yum errors but it seems like some misconfiguration. finally the only difference in the spec file that these RPMs were created withe is a version number. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: Michał P. <mk...@gm...> - 2012-08-14 19:32:13
|
Hi, 2012/8/14 Artyom Beilis <art...@ya...>: > > > CppCMS 1.0.2 Released, it is a bug fix release. > > Fixed Bugs: > > - Fixed incorrect HTML generation using `as_table` > - Fixed build issues with latest ICU: 3540278 > - Fixed some warnings in Boost.Locale > - Fixed missing error report in case of running out of disk space in file upload: 3542469 > - Fixed visual studio 11 build issues: 3527712,3527702 > - Fixed problem with using automatic type detection in C++11 mode with gcc 3537374 > - Fixed bugs that made stackstream useless > - Fixed issues build issues on Mac OS X: 3513865 > - Fixed OpenSSL detection on Windows: 3515712 > - Fixed incorrect scgi configuration for nginx in `cppcms_run` > > > Updated repositories: > > The deb and rpm files published for x86 and x86_64 architectures for for following distributions: > > Ubuntu: oneiric, precise (11.10 and 12.04LTS) > Debian: squeezy (6.0) > CentOS: 6 > Fedora: 16 and 17 FYI I get this error on F17 ERROR with transaction check vs depsolve: libicudata.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 libicui18n.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 libicuuc.so.46()(64bit) is needed by libcppcms-1.0.2-37.1.x86_64 libicudata.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 libicui18n.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 libicuuc.so.46()(64bit) is needed by cppcms-tools-1.0.2-37.1.x86_64 Please report this error in https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=rawhide&component=yum ** Found 6 pre-existing rpmdb problem(s), 'yum check' output follows: cppcms-tools-1.0.1-24.1.x86_64 has missing requires of libicudata.so.46()(64bit) cppcms-tools-1.0.1-24.1.x86_64 has missing requires of libicui18n.so.46()(64bit) cppcms-tools-1.0.1-24.1.x86_64 has missing requires of libicuuc.so.46()(64bit) libcppcms-1.0.1-24.1.x86_64 has missing requires of libicudata.so.46()(64bit) libcppcms-1.0.1-24.1.x86_64 has missing requires of libicui18n.so.46()(64bit) libcppcms-1.0.1-24.1.x86_64 has missing requires of libicuuc.so.46()(64bit) > OpenSuse: 11.4 and 12.1 > > Artyom Beilis > ------------- > Support CppCMS by donating money: > https://sourceforge.net/donate/index.php?group_id=209965 > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users -- Best regards, Michal http://eventhorizon.pl/ https://getactive.pl/ |