Closed eventhorizonpl closed 11 years ago
Hello are you compiling cppcms-skeleton with C++11 features enabled ?
This is my build script:
ROOT=/home/samba1/tmp/cppcms/cppcms-skeleton/
cd $ROOT pwd if [ ! -e build ] then mkdir build fi cd build cmake .. make sudo make install
As you can see I don't use any magic flags here.
Here are compiler deails:
g++ (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8) Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@eventhorizonpl try to subsitute CMakeList.txt as below:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
CMAKE_CXX_FLAGS "-std=c++11"
@ShuminHuang Unfortunately it doesn't fix the problem. c++0x should be an alias for c++11 AFAIU compiler documentation
"G++ now accepts the -std=c++11, -std=gnu++11, and -Wc++11-compat options, which are equivalent to -std=c++0x, -std=gnu++0x, and -Wc++0x-compat, respectively."
@eventhorizonpl hmm the big change between that commit and the followings, is that I've introduced some functions that are C++11 only
This issue can be closed. I had cppcms in trunk version
Hi,
I'm trying to get working cppcms and cppcms-skeleton. I get this while building. The latest version that works fine here is cc2166ebada48f12cab1ce76a7efff745f3616bb. Can you give me some tips?
Best regards, Michal
/home/samba1/tmp/cppcms/cppcms-skeleton -- Configuring done -- Generating done -- Build files have been written to: /home/samba1/tmp/cppcms/cppcms-skeleton/build [ 4%] Building CXX object CMakeFiles/cppcmsskel.dir/cppcms_skel/controllers/webs/Css.cpp.o In file included from /home/samba1/tmp/cppcms/cppcms-skeleton/cppcms_skel/controllers/webs/Css.cpp:38:0: /usr/include/cppcms/http_response.h:320:21: error: ‘shared_ptr’ is not a member of ‘booster’ /usr/include/cppcms/http_response.h:320:21: error: ‘shared_ptr’ is not a member of ‘booster’ /usr/include/cppcms/http_response.h:320:41: error: ‘vector’ is not a member of ‘std’ /usr/include/cppcms/http_response.h:320:57: error: wrong number of template arguments (1, should be 2) In file included from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_algobase.h:65:0, from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:41, from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/ios:41, from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/istream:40, from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/fstream:40, from /home/samba1/tmp/cppcms/cppcms-skeleton/cppcms_skel/controllers/webs/Css.cpp:35: /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_pair.h:88:12: error: provided for ‘template<class _T1, class _T2> struct std::pair’ In file included from /home/samba1/tmp/cppcms/cppcms-skeleton/cppcms_skel/controllers/webs/Css.cpp:38:0: /usr/include/cppcms/http_response.h:320:59: error: expected unqualified-id before ‘>’ token /usr/include/cppcms/http_response.h:321:3: error: ‘chunk_type’ does not name a type make[2]: * [CMakeFiles/cppcmsskel.dir/cppcms_skel/controllers/webs/Css.cpp.o] Błąd 1 make[1]: * [CMakeFiles/cppcmsskel.dir/all] Błąd 2 make: * [all] Błąd 2 [ 4%] Building CXX object CMakeFiles/cppcmsskel.dir/cppcms_skel/controllers/webs/Css.cpp.o In file included from /home/samba1/tmp/cppcms/cppcms-skeleton/cppcms_skel/controllers/webs/Css.cpp:38:0: /usr/include/cppcms/http_response.h:320:21: error: ‘shared_ptr’ is not a member of ‘booster’ /usr/include/cppcms/http_response.h:320:21: error: ‘shared_ptr’ is not a member of ‘booster’ /usr/include/cppcms/http_response.h:320:41: error: ‘vector’ is not a member of ‘std’ /usr/include/cppcms/http_response.h:320:57: error: wrong number of template arguments (1, should be 2) In file included from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_algobase.h:65:0, from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:41, from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/ios:41, from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/istream:40, from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/fstream:40, from /home/samba1/tmp/cppcms/cppcms-skeleton/cppcms_skel/controllers/webs/Css.cpp:35: /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_pair.h:88:12: error: provided for ‘template<class _T1, class _T2> struct std::pair’ In file included from /home/samba1/tmp/cppcms/cppcms-skeleton/cppcms_skel/controllers/webs/Css.cpp:38:0: /usr/include/cppcms/http_response.h:320:59: error: expected unqualified-id before ‘>’ token /usr/include/cppcms/http_response.h:321:3: error: ‘chunk_type’ does not name a type make[2]: * [CMakeFiles/cppcmsskel.dir/cppcms_skel/controllers/webs/Css.cpp.o] Błąd 1 make[1]: * [CMakeFiles/cppcmsskel.dir/all] Błąd 2 make: * [all] Błąd 2