Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error: gcc-10.x #50

Open
sergei-mironov opened this issue Oct 1, 2021 · 2 comments
Open

Compilation error: gcc-10.x #50

sergei-mironov opened this issue Oct 1, 2021 · 2 comments

Comments

@sergei-mironov
Copy link

Hi, I have a problem compiling tg2sip with gcc10x. Older gcc9x seems to work fine.

The gcc10x errors are as follows:

[ 99%] Building CXX object CMakeFiles/tg2sip.dir/tg2sip/utils.cpp.o                                                                                                                                                                                  
In file included from /build/tg2sip-1.2.0/tg2sip/gateway.h:24,                                                                                                                                                                                       
                 from /build/tg2sip-1.2.0/tg2sip/gateway.cpp:19:                                                                                                                                                                                     
/build/tg2sip-1.2.0/include/boost/sml.hpp:2528:8: warning: undefining "__has_builtin"                                                                                                                                                                
 2528 | #undef __has_builtin                                                                                                                                                                                                                         
      |        ^~~~~~~~~~~~~                                                                                                                                                                                                                         
In file included from /build/tg2sip-1.2.0/tg2sip/gateway.h:24,                                                                                                                                                                                       
                 from /build/tg2sip-1.2.0/tg2sip/main.cpp:27:                                                                                                                                                                                        
/build/tg2sip-1.2.0/include/boost/sml.hpp:2528:8: warning: undefining "__has_builtin"                                                                                                                                                                
 2528 | #undef __has_builtin                                                                                                                                                                                                                         
      |        ^~~~~~~~~~~~~                                                                                                                                                                                                                         
/build/tg2sip-1.2.0/tg2sip/utils.cpp: In function 'bool is_digits(const string&)':                                                                                                                                                                   
/build/tg2sip-1.2.0/tg2sip/utils.cpp:21:61: error: invalid use of incomplete type 'const string' {aka 'const class std::__cxx11::basic_string<char>'}                                                                                                
   21 | bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); };                                                                                                                                           
      |                                                             ^~~                                                                                                                                                                              
In file included from /nix/store/cfkfpca5ymx2rf66k6f16sa3lb6ndgc2-gcc-10.3.0/include/c++/10.3.0/iosfwd:39,                                                                                                                                           
                 from /nix/store/cfkfpca5ymx2rf66k6f16sa3lb6ndgc2-gcc-10.3.0/include/c++/10.3.0/memory:74,                                                                                                                                           
                 from /build/tg2sip-1.2.0/tg2sip/utils.h:21,                                                                                                                                                                                         
                 from /build/tg2sip-1.2.0/tg2sip/utils.cpp:19:                                                                                                                                                                                       
/nix/store/cfkfpca5ymx2rf66k6f16sa3lb6ndgc2-gcc-10.3.0/include/c++/10.3.0/bits/stringfwd.h:74:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string<char>'}                                                                  
   74 |     class basic_string;                                                                                                                                                                                                                      
      |           ^~~~~~~~~~~~                                                                                                                                                                                                                       
/build/tg2sip-1.2.0/tg2sip/utils.cpp:21:74: error: invalid use of incomplete type 'const string' {aka 'const class std::__cxx11::basic_string<char>'}                                                                                                
   21 | bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); };                                                                                                                                           
      |                                                                          ^~~                                                                                                                                                                 
In file included from /nix/store/cfkfpca5ymx2rf66k6f16sa3lb6ndgc2-gcc-10.3.0/include/c++/10.3.0/iosfwd:39,                                                                                                                                           
                 from /nix/store/cfkfpca5ymx2rf66k6f16sa3lb6ndgc2-gcc-10.3.0/include/c++/10.3.0/memory:74,                                                                                                                                           
                 from /build/tg2sip-1.2.0/tg2sip/utils.h:21,                                                                                                                                                                                         
                 from /build/tg2sip-1.2.0/tg2sip/utils.cpp:19:                                                                                                                                                                                       
/nix/store/cfkfpca5ymx2rf66k6f16sa3lb6ndgc2-gcc-10.3.0/include/c++/10.3.0/bits/stringfwd.h:74:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string<char>'}                                                                  
   74 |     class basic_string;                                                                                                                                                                                                                      
      |           ^~~~~~~~~~~~                                                                                                                                                                                                                       
/build/tg2sip-1.2.0/tg2sip/utils.cpp:21:87: error: '::isdigit' has not been declared; did you mean 'is_digits'?                                                                                                                                      
   21 | bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); };                                                                                                                                           
      |                                                                                       ^~~~~~~                                                                                                                                                
      |                                                                                       is_digits 
@varlog11
Copy link

varlog11 commented Feb 3, 2022

Hi, I have a same problem compiling tg2sip v1.3.0

@boffart
Copy link

boffart commented Sep 15, 2022

Тоже с этим столкнулся.

Нужно добавить #include <string> в
https://github.com/Infactum/tg2sip/blob/master/tg2sip/utils.cpp#L20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants