gpt4 book ai didi

c++ - 在 centos eclipse 符号 'XXX' 无法解决多个错误

转载 作者:太空宇宙 更新时间:2023-11-04 13:20:34 35 4
gpt4 key购买 nike

我在Centos上安装了eclipse,安装了boost c++ lib。

当我运行代码时,它给出了这样的错误

Description Resource    Path    Location    Type
Function 'buffer_cast' could not be resolved TCP_client.cpp /TCP_client line 112 Semantic Error
Function 'buffer' could not be resolved TCP_client.cpp /TCP_client line 106 Semantic Error
Function 'connect' could not be resolved TCP_client.cpp /TCP_client line 46 Semantic Error
Function 'make_pair' could not be resolved TCP_client.cpp /TCP_client line 92 Semantic Error
Function 'make_pair' could not be resolved TCP_client.cpp /TCP_client line 93 Semantic Error
Function 'now' could not be resolved TCP_client.cpp /TCP_client line 70 Semantic Error
Function 'read_until' could not be resolved TCP_client.cpp /TCP_client line 111 Semantic Error
Function 'strcmp' could not be resolved TCP_client.cpp /TCP_client line 74 Semantic Error
Function 'strcmp' could not be resolved TCP_client.cpp /TCP_client line 74 Semantic Error
Function 'strcmp' could not be resolved TCP_client.cpp /TCP_client line 79 Semantic Error
Function 'strlen' could not be resolved TCP_client.cpp /TCP_client line 105 Semantic Error
Function 'write' could not be resolved TCP_client.cpp /TCP_client line 106 Semantic Error
Invalid arguments '
Candidates are:
' TCP_client.cpp /TCP_client line 99 Semantic Error
make: *** [TCP_client.o] Error 1 TCP_client C/C++ Problem
Method 'add_child' could not be resolved TCP_client.cpp /TCP_client line 95 Semantic Error
Method 'add_child' could not be resolved TCP_client.cpp /TCP_client line 96 Semantic Error
Method 'c_str' could not be resolved TCP_client.cpp /TCP_client line 102 Semantic Error
Method 'data' could not be resolved TCP_client.cpp /TCP_client line 112 Semantic Error
Method 'getline' could not be resolved TCP_client.cpp /TCP_client line 52 Semantic Error
Method 'push_back' could not be resolved TCP_client.cpp /TCP_client line 92 Semantic Error
Method 'push_back' could not be resolved TCP_client.cpp /TCP_client line 93 Semantic Error
Method 'put' could not be resolved TCP_client.cpp /TCP_client line 68 Semantic Error
Method 'put' could not be resolved TCP_client.cpp /TCP_client line 70 Semantic Error
Method 'put' could not be resolved TCP_client.cpp /TCP_client line 76 Semantic Error
Method 'put' could not be resolved TCP_client.cpp /TCP_client line 77 Semantic Error
Method 'put' could not be resolved TCP_client.cpp /TCP_client line 81 Semantic Error
Method 'put' could not be resolved TCP_client.cpp /TCP_client line 82 Semantic Error
Method 'put' could not be resolved TCP_client.cpp /TCP_client line 83 Semantic Error
Method 'put' could not be resolved TCP_client.cpp /TCP_client line 87 Semantic Error
Method 'put' could not be resolved TCP_client.cpp /TCP_client line 88 Semantic Error
Method 'resolve' could not be resolved TCP_client.cpp /TCP_client line 43 Semantic Error
Method 'str' could not be resolved TCP_client.cpp /TCP_client line 100 Semantic Error
Method 'what' could not be resolved TCP_client.cpp /TCP_client line 120 Semantic Error
Symbol 'buffer_cast' could not be resolved TCP_client.cpp /TCP_client line 112 Semantic Error
Symbol 'cerr' could not be resolved TCP_client.cpp /TCP_client line 120 Semantic Error
Symbol 'chrono' could not be resolved TCP_client.cpp /TCP_client line 23 Semantic Error
Symbol 'cin' could not be resolved TCP_client.cpp /TCP_client line 52 Semantic Error
Symbol 'cout' could not be resolved TCP_client.cpp /TCP_client line 50 Semantic Error
Symbol 'cout' could not be resolved TCP_client.cpp /TCP_client line 104 Semantic Error
Symbol 'cout' could not be resolved TCP_client.cpp /TCP_client line 113 Semantic Error
Symbol 'cout' could not be resolved TCP_client.cpp /TCP_client line 115 Semantic Error
Symbol 'endl' could not be resolved TCP_client.cpp /TCP_client line 104 Semantic Error
Symbol 'ptree' could not be resolved TCP_client.cpp /TCP_client line 18 Semantic Error
Symbol 'read_json' could not be resolved TCP_client.cpp /TCP_client line 19 Semantic Error
Symbol 'std' could not be resolved TCP_client.cpp /TCP_client line 49 Semantic Error
Symbol 'tcp' could not be resolved TCP_client.cpp /TCP_client line 25 Semantic Error
Symbol 'write_json' could not be resolved TCP_client.cpp /TCP_client line 20 Semantic Error
Type 'boost::asio::io_service' could not be resolved TCP_client.cpp /TCP_client line 39 Semantic Error
Type 'boost::asio::streambuf' could not be resolved TCP_client.cpp /TCP_client line 110 Semantic Error
Type 'ptree' could not be resolved TCP_client.cpp /TCP_client line 61 Semantic Error
Type 'ptree' could not be resolved TCP_client.cpp /TCP_client line 62 Semantic Error
Type 'ptree' could not be resolved TCP_client.cpp /TCP_client line 64 Semantic Error
Type 'ptree' could not be resolved TCP_client.cpp /TCP_client line 65 Semantic Error
Type 'size_t' could not be resolved TCP_client.cpp /TCP_client line 105 Semantic Error
Type 'size_t' could not be resolved TCP_client.cpp /TCP_client line 106 Semantic Error
Type 'std::exception' could not be resolved TCP_client.cpp /TCP_client line 118 Semantic Error
Type 'std::ostringstream' could not be resolved TCP_client.cpp /TCP_client line 97 Semantic Error
Type 'std::string' could not be resolved TCP_client.cpp /TCP_client line 100 Semantic Error
Type 'tcp::resolver::iterator' could not be resolved TCP_client.cpp /TCP_client line 43 Semantic Error
Type 'tcp::resolver::query' could not be resolved TCP_client.cpp /TCP_client line 42 Semantic Error
Type 'tcp::resolver' could not be resolved TCP_client.cpp /TCP_client line 41 Semantic Error
Type 'tcp::socket' could not be resolved TCP_client.cpp /TCP_client line 45 Semantic Error

请帮助解决这些问题。我是 Linux 新手。

我在 Windows 的 VS2008 上使用 BOOST 构建了相同的代码,它可以正常工作。

谢谢

最佳答案

“Window -> Preferences -> C/C++ -> Build -> Environment”,添加名称“LANG”和“LC_ALL”,所有值为“en_US”。

关于c++ - 在 centos eclipse 符号 'XXX' 无法解决多个错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35474066/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com