覆盖问题<shui>

题目链接

/*
hang[maxn]标记每行是否可以被攻击,并计算前缀和
lie [maxn]标记每列是否可以被攻击,并计算前缀和
*/
#include<cstdio>   //
#include<cstring>
#include<iostream>
using namespace std;
const int maxn =100000+5;
int hang[maxn];
int lie[maxn];
int n,m,k,q;
int t;
int main ()
{
    scanf("%d",&t);
    while(t--)
    {
        scanf("%d%d%d%d",&n,&m,&k,&q);
        for(int i=0;i<=n;i++)
            hang[i]=0;
        for(int j=0;j<=m;j++)
            lie[j]=0;
        int x ,y;
        for(int i=1;i<=k;i++)
        {
            scanf("%d%d",&x,&y);
            hang[x]=1;
            lie[y]=1;
        }
        for(int i=1;i<=n;i++)
            hang[i]+=hang[i-1];
        for(int j=1;j<=m;j++)
            lie[j]+=lie[j-1];
        int x1,x2,y1,y2;
        for(int i=0;i<q;i++)
        {
            scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
            if((hang[x2]-hang[x1-1]==x2-x1+1)||(lie[y2]-lie[y1-1]==y2-y1+1))
                printf("Yes\n");
            else
                printf("No\n");
        }
    }
    return 0;
}
* { margin: 0; padding: 0; } body { font-family: "微软雅黑", Arial, sans-serif; font-size: 14px; } .banner { width: 100%; height: 300px; position: relative; } .banner img { width: 100%; height: 300px; object-fit: cover; } .layer { position: absolute; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); } .banner p { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; font-size: 45px; text-align: center; } .container { width: 100%; height: 50px; background: darkorange; margin-top: 2px; } .menu { width: 800px; height: 50px; margin: 0 auto; } .menu ul { display: flex; justify-content: space-around; align-items: center; } .menu ul li { list-style: none; } .menu a { text-decoration: none; color: white; padding: 15px 20px; display: block; } .menu a:hover { background: darkgreen; } .footer { width: 800px; height: 400px; margin: 20px auto; display: flex; } .left { flex: 1; background: black; position: relative; } .right { flex: 1; background: #eee; padding: 20px; } .left ul li { list-style: none; border-radius: 100%; border: 1px solid #394; position: absolute; } .sun { width: 20px; height: 20px; background: yellow; top: 185px; left: 190px; border: none; } .shui { width: 60px; height: 30px; top: 165px; left: 170px; animation: myanimation 6s linear infinite; } .shui span { width: 4px; height: 4px; background: blue; display: block; border-radius: 100%; position: absolute; left: 5px; top: 8px; } .earth { width: 130px; height: 130px; top: 130px; left: 135px; animation: myanimation 5s linear infinite; } .earth > span { width: 4px; height: 20px; background: yellow; position: absolute; left: 5px; top: 8px; } .moon { width: 2px; height: 2px; background: rgb(243, 242, 242); position: absolute; top: -4px; left: -4px; display: block; border-radius: 100%; } @keyframes myanimation { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .btn { display: inline-block; padding: 10px 20px; background: #4d92d9; color: white; text-decoration: none; border: 2px solid #4d92d9; transition: all 0.4s; } .btn:hover { background: white; color: #4d92d9; }<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" type="text/css" href="sy2.css" /> </head> <body> <div class="banner"> <div class="img"> <img src="images/1.jpeg"> </div> <div class="layer"></div> <p></p > </div> <div class="container"> <div class="menu"> <ul> <li><a href=" ">首页</a ></li> <li><a href="#">推荐阅读</a ></li> <li><a href="#">历史故事</a ></li> <li><a href="#">代表人物</a ></li> <li><a href="#">代表人物</a ></li> <li><a href="#">体育锻炼</a ></li> <li><a href="#">学习攻略</a ></li> <li><a href="#">头脑风暴</a ></li> </ul> </div> </div> <div class="footer"> <div class="left"> <ul> <li class="sun"></li> <li class="shui"><span></span></li> <li class="jin"><span></span></li> <li class="earth"><span><span class="moon"></span></li> </ul> </div> <div class="right"> </div> </div> </body> </html>帮我完善我现在写的代码完成实验指导书内容
11-15
-------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 ModbusTCPClient::connect() conn-000-addr=192.168.1.27;_running=0 2025-10-03 10:43:29.019 [24138] LOG_DEBUG modbus_tcp connect 192.168.1.27:502 start... 2025-10-03 10:43:29.020 [24138] LOG_INFO modbus_tcp serveraddr is ip format -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 2025-10-03 10:43:29.238 [24140] LOG_DEBUG 192.168.1.27:502: tcp connect suc: 2025-10-03 10:43:29.238 [24140] LOG_INFO 192.168.1.27:502: tcp start rec data -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=1 ----------id=1;address=2 ---------id=1;value=0 --input.id=1;data_point.size()=1 ====================================== -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 ModbusTCPClient::connect() conn-000-addr=192.168.1.27;ret=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 ModbusTCPClient::connect() conn-111-addr=192.168.1.27;_process_thread=1 [2025-10-03 10:43:30] ModbusTCPInput::start conn_status: 3;collect_status:2;_running:1;_poll_thread:1 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=1 ----------id=1;address=2 ---------id=1;value=0 --input.id=1;data_point.size()=1 ====================================== -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 MQTT connecting -222- to tcp://192.168.1.27:1883 with _connected 0 -------------------------------------- Failed to start output processor -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=1 ----------id=1;address=2 ---------id=1;value=0 --input.id=1;data_point.size()=1 ====================================== -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 MQTT connecting -222- to tcp://192.168.1.27:1883 with _connected 0 Failed to start output processor GatewayManager::start()00: 1 Gateway manager started. Press Ctrl+C or Ctrl+Z to stop. -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=1 [2025-10-03 10:43:32] Initialized upload,logs and download directories [2025-10-03 10:43:32] Server started on port :8082 ----------id=1;address=2 ---------id=1;value=0 --input.id=1;data_point.size()=1 ====================================== -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=1 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 ----------id=1;address=2 ---------id=1;value=0 --input.id=1;data_point.size()=1 ====================================== -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 get- pathMoudle: collectconn collectconn:in Database opened: ./jcdz-db.db -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=1 ----------id=1;address=2 ---------id=1;value=0 --input.id=1;data_point.size()=1 ====================================== SQL sql=:SELECT CollectConnNO, Name,ConnType,ProtocolType, Path,DnsIP,Port,Timeout,Memo,ConnStatus,ConnTime,CollectStatus,CollectTime,ChanCount,ComName,ComBaudRate,ComParityCheck,ComStopBit,RegDevName,RegDevId,RegMode,RegFactType,RegFactChan,RegFactNO FROM IOT_CollectConn_info; -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 [2025-10-03 10:43:35] GET /api/collectconn - Status: 200 - Remote: 192.168.20.27:61079 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 -------------------------------------- -------data_points.size()=1 ModbusTCPInput::pollData() conn-id=1;dp.id=1;elapsed=0 get- pathMoudle: collectconn collectconn:in stop ----: conn [2025-10-03 10:43:36] ModbusTCPInput::stop conn_status: 0;collect_status:5;_running:1;_poll_thread:1 ==24138== Thread 14: ==24138== Conditional jump or move depends on uninitialised value(s) ==24138== at 0x25B4A3: JCNetopTcpclient::Stop() (JCNetopTcpclient.cpp:293) ==24138== by 0x2466FF: ModbusTCPClient::disconnect() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x162DC3: ModbusTCPInput::stop() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x168BF7: GatewayManager::stopInputProcessors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1B1868: CollectConn::get[abi:cxx11](httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x18F56A: handle_get(httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x2145B0: void std::__invoke_impl<void, void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&>(std::__invoke_other, void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x206BBE: std::enable_if<std::__and_<std::is_void<void>, std::__is_invocable<void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&> >::value, void>::type std::__invoke_r<void, void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&>(void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1F38D2: std::_Function_handler<void (httplib::Request const&, httplib::Response&), void (*)(httplib::Request const&, httplib::Response&)>::_M_invoke(std::_Any_data const&, httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1DF3FA: std::function<void (httplib::Request const&, httplib::Response&)>::operator()(httplib::Request const&, httplib::Response&) const (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1A18B8: httplib::Server::dispatch_request(httplib::Request&, httplib::Response&, std::vector<std::pair<boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >, std::function<void (httplib::Request const&, httplib::Response&)> >, std::allocator<std::pair<boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >, std::function<void (httplib::Request const&, httplib::Response&)> > > > const&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1A15AA: httplib::Server::routing(httplib::Request&, httplib::Response&, httplib::Stream&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== Uninitialised value was created by a heap allocation ==24138== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==24138== by 0x24608E: ModbusTCPClient::ModbusTCPClient(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned short) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x16249E: ModbusTCPInput::ModbusTCPInput(InputConfig&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x183FC0: void __gnu_cxx::new_allocator<ModbusTCPInput>::construct<ModbusTCPInput, InputConfig&>(ModbusTCPInput*, InputConfig&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x182F5D: void std::allocator_traits<std::allocator<ModbusTCPInput> >::construct<ModbusTCPInput, InputConfig&>(std::allocator<ModbusTCPInput>&, ModbusTCPInput*, InputConfig&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1817A7: std::_Sp_counted_ptr_inplace<ModbusTCPInput, std::allocator<ModbusTCPInput>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<InputConfig&>(std::allocator<ModbusTCPInput>, InputConfig&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x17F945: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<ModbusTCPInput, std::allocator<ModbusTCPInput>, InputConfig&>(ModbusTCPInput*&, std::_Sp_alloc_shared_tag<std::allocator<ModbusTCPInput> >, InputConfig&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x17DD45: std::__shared_ptr<ModbusTCPInput, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<ModbusTCPInput>, InputConfig&>(std::_Sp_alloc_shared_tag<std::allocator<ModbusTCPInput> >, InputConfig&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x17BA86: std::shared_ptr<ModbusTCPInput>::shared_ptr<std::allocator<ModbusTCPInput>, InputConfig&>(std::_Sp_alloc_shared_tag<std::allocator<ModbusTCPInput> >, InputConfig&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x178230: std::shared_ptr<ModbusTCPInput> std::allocate_shared<ModbusTCPInput, std::allocator<ModbusTCPInput>, InputConfig&>(std::allocator<ModbusTCPInput> const&, InputConfig&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x174553: std::shared_ptr<ModbusTCPInput> std::make_shared<ModbusTCPInput, InputConfig&>(InputConfig&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x169B98: GatewayManager::createProcessors(std::vector<GatewayConfig, std::allocator<GatewayConfig> >&, bool) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== ==24138== Invalid read of size 8 ==24138== at 0x145344: std::vector<GatewayConfig, std::allocator<GatewayConfig> >::size() const (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x174BED: std::vector<GatewayConfig, std::allocator<GatewayConfig> >::vector(std::vector<GatewayConfig, std::allocator<GatewayConfig> > const&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x16A073: GatewayManager::getGateways() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x168C18: GatewayManager::stopInputProcessors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1B1868: CollectConn::get[abi:cxx11](httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x18F56A: handle_get(httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x2145B0: void std::__invoke_impl<void, void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&>(std::__invoke_other, void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x206BBE: std::enable_if<std::__and_<std::is_void<void>, std::__is_invocable<void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&> >::value, void>::type std::__invoke_r<void, void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&>(void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1F38D2: std::_Function_handler<void (httplib::Request const&, httplib::Response&), void (*)(httplib::Request const&, httplib::Response&)>::_M_invoke(std::_Any_data const&, httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1DF3FA: std::function<void (httplib::Request const&, httplib::Response&)>::operator()(httplib::Request const&, httplib::Response&) const (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1A18B8: httplib::Server::dispatch_request(httplib::Request&, httplib::Response&, std::vector<std::pair<boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >, std::function<void (httplib::Request const&, httplib::Response&)> >, std::allocator<std::pair<boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >, std::function<void (httplib::Request const&, httplib::Response&)> > > > const&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1A15AA: httplib::Server::routing(httplib::Request&, httplib::Response&, httplib::Stream&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== Address 0xa0 is not stack'd, malloc'd or (recently) free'd ==24138== ==24138== ==24138== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==24138== Access not within mapped region at address 0xA0 ==24138== at 0x145344: std::vector<GatewayConfig, std::allocator<GatewayConfig> >::size() const (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x174BED: std::vector<GatewayConfig, std::allocator<GatewayConfig> >::vector(std::vector<GatewayConfig, std::allocator<GatewayConfig> > const&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x16A073: GatewayManager::getGateways() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x168C18: GatewayManager::stopInputProcessors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1B1868: CollectConn::get[abi:cxx11](httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x18F56A: handle_get(httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x2145B0: void std::__invoke_impl<void, void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&>(std::__invoke_other, void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x206BBE: std::enable_if<std::__and_<std::is_void<void>, std::__is_invocable<void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&> >::value, void>::type std::__invoke_r<void, void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&>(void (*&)(httplib::Request const&, httplib::Response&), httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1F38D2: std::_Function_handler<void (httplib::Request const&, httplib::Response&), void (*)(httplib::Request const&, httplib::Response&)>::_M_invoke(std::_Any_data const&, httplib::Request const&, httplib::Response&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1DF3FA: std::function<void (httplib::Request const&, httplib::Response&)>::operator()(httplib::Request const&, httplib::Response&) const (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1A18B8: httplib::Server::dispatch_request(httplib::Request&, httplib::Response&, std::vector<std::pair<boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >, std::function<void (httplib::Request const&, httplib::Response&)> >, std::allocator<std::pair<boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >, std::function<void (httplib::Request const&, httplib::Response&)> > > > const&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1A15AA: httplib::Server::routing(httplib::Request&, httplib::Response&, httplib::Stream&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== If you believe this happened as a result of a stack ==24138== overflow in your program's main thread (unlikely but ==24138== possible), you can try to increase the size of the ==24138== main thread stack using the --main-stacksize= flag. ==24138== The main thread stack size used in this run was 8388608. ==24138== ==24138== HEAP SUMMARY: ==24138== in use at exit: 485,052 bytes in 1,234 blocks ==24138== total heap usage: 3,183 allocs, 1,949 frees, 799,663 bytes allocated ==24138== ==24138== Thread 1: ==24138== 304 bytes in 1 blocks are possibly lost in loss record 403 of 561 ==24138== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==24138== by 0x40147D9: calloc (rtld-malloc.h:44) ==24138== by 0x40147D9: allocate_dtv (dl-tls.c:375) ==24138== by 0x40147D9: _dl_allocate_tls (dl-tls.c:634) ==24138== by 0x4E657B4: allocate_stack (allocatestack.c:430) ==24138== by 0x4E657B4: pthread_create@@GLIBC_2.34 (pthread_create.c:647) ==24138== by 0x26BC48: zsummer::log4z::ThreadHelper::start() (log4z.cpp:1145) ==24138== by 0x26D5CE: zsummer::log4z::LogerManager::start() (log4z.cpp:1490) ==24138== by 0x268BF0: JCCommuLib::JCCommuLib() (JCCommuLib.cpp:34) ==24138== by 0x268ECB: JCCommuLib::getInstance() (JCCommuLib.cpp:67) ==24138== by 0x19142B: main (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== ==24138== 304 bytes in 1 blocks are possibly lost in loss record 404 of 561 ==24138== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==24138== by 0x40147D9: calloc (rtld-malloc.h:44) ==24138== by 0x40147D9: allocate_dtv (dl-tls.c:375) ==24138== by 0x40147D9: _dl_allocate_tls (dl-tls.c:634) ==24138== by 0x4E657B4: allocate_stack (allocatestack.c:430) ==24138== by 0x4E657B4: pthread_create@@GLIBC_2.34 (pthread_create.c:647) ==24138== by 0x4C5E328: std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30) ==24138== by 0x2697F3: std::thread::thread<void (JCCommuLib::*)(), JCCommuLib*, void>(void (JCCommuLib::*&&)(), JCCommuLib*&&) (std_thread.h:143) ==24138== by 0x26950A: JCCommuLib::Run() (JCCommuLib.cpp:106) ==24138== by 0x191455: main (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== ==24138== 304 bytes in 1 blocks are possibly lost in loss record 405 of 561 ==24138== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==24138== by 0x40147D9: calloc (rtld-malloc.h:44) ==24138== by 0x40147D9: allocate_dtv (dl-tls.c:375) ==24138== by 0x40147D9: _dl_allocate_tls (dl-tls.c:634) ==24138== by 0x4E657B4: allocate_stack (allocatestack.c:430) ==24138== by 0x4E657B4: pthread_create@@GLIBC_2.34 (pthread_create.c:647) ==24138== by 0x4AD526D: Paho_thread_start (in /usr/local/lib/libpaho-mqtt3a.so.1.3.15) ==24138== by 0x4AB8F14: MQTTAsync_connect (in /usr/local/lib/libpaho-mqtt3a.so.1.3.15) ==24138== by 0x24FCAF: MQTTClientWrapper::connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x167AB5: MQTTOutput::start() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1683DE: GatewayManager::start() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x191529: main (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== ==24138== 304 bytes in 1 blocks are possibly lost in loss record 406 of 561 ==24138== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==24138== by 0x40147D9: calloc (rtld-malloc.h:44) ==24138== by 0x40147D9: allocate_dtv (dl-tls.c:375) ==24138== by 0x40147D9: _dl_allocate_tls (dl-tls.c:634) ==24138== by 0x4E657B4: allocate_stack (allocatestack.c:430) ==24138== by 0x4E657B4: pthread_create@@GLIBC_2.34 (pthread_create.c:647) ==24138== by 0x4AD526D: Paho_thread_start (in /usr/local/lib/libpaho-mqtt3a.so.1.3.15) ==24138== by 0x4AB8F4A: MQTTAsync_connect (in /usr/local/lib/libpaho-mqtt3a.so.1.3.15) ==24138== by 0x24FCAF: MQTTClientWrapper::connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x167AB5: MQTTOutput::start() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1683DE: GatewayManager::start() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x191529: main (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== ==24138== 304 bytes in 1 blocks are possibly lost in loss record 407 of 561 ==24138== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==24138== by 0x40147D9: calloc (rtld-malloc.h:44) ==24138== by 0x40147D9: allocate_dtv (dl-tls.c:375) ==24138== by 0x40147D9: _dl_allocate_tls (dl-tls.c:634) ==24138== by 0x4E657B4: allocate_stack (allocatestack.c:430) ==24138== by 0x4E657B4: pthread_create@@GLIBC_2.34 (pthread_create.c:647) ==24138== by 0x4C5E328: std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30) ==24138== by 0x173E3D: std::thread::thread<void (GatewayManager::*)(), GatewayManager*, void>(void (GatewayManager::*&&)(), GatewayManager*&&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1684B0: GatewayManager::start() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x191529: main (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== ==24138== 608 bytes in 2 blocks are possibly lost in loss record 472 of 561 ==24138== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==24138== by 0x40147D9: calloc (rtld-malloc.h:44) ==24138== by 0x40147D9: allocate_dtv (dl-tls.c:375) ==24138== by 0x40147D9: _dl_allocate_tls (dl-tls.c:634) ==24138== by 0x4E657B4: allocate_stack (allocatestack.c:430) ==24138== by 0x4E657B4: pthread_create@@GLIBC_2.34 (pthread_create.c:647) ==24138== by 0x4C5E328: std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30) ==24138== by 0x17202D: std::thread::thread<void (ModbusTCPInput::*)(), ModbusTCPInput*, void>(void (ModbusTCPInput::*&&)(), ModbusTCPInput*&&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x162682: ModbusTCPInput::start() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x168330: GatewayManager::start() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x191529: main (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== ==24138== 608 bytes in 2 blocks are possibly lost in loss record 473 of 561 ==24138== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==24138== by 0x40147D9: calloc (rtld-malloc.h:44) ==24138== by 0x40147D9: allocate_dtv (dl-tls.c:375) ==24138== by 0x40147D9: _dl_allocate_tls (dl-tls.c:634) ==24138== by 0x4E657B4: allocate_stack (allocatestack.c:430) ==24138== by 0x4E657B4: pthread_create@@GLIBC_2.34 (pthread_create.c:647) ==24138== by 0x4C5E328: std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30) ==24138== by 0x24731D: std::thread::thread<void (ModbusTCPClient::*)(), ModbusTCPClient*, void>(void (ModbusTCPClient::*&&)(), ModbusTCPClient*&&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x2464FE: ModbusTCPClient::connect() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1626C9: ModbusTCPInput::start() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x168330: GatewayManager::start() (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x191529: main (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== ==24138== 1,520 bytes in 5 blocks are possibly lost in loss record 544 of 561 ==24138== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==24138== by 0x40147D9: calloc (rtld-malloc.h:44) ==24138== by 0x40147D9: allocate_dtv (dl-tls.c:375) ==24138== by 0x40147D9: _dl_allocate_tls (dl-tls.c:634) ==24138== by 0x4E657B4: allocate_stack (allocatestack.c:430) ==24138== by 0x4E657B4: pthread_create@@GLIBC_2.34 (pthread_create.c:647) ==24138== by 0x4C5E328: std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30) ==24138== by 0x206F09: std::thread::thread<httplib::ThreadPool::worker, , void>(httplib::ThreadPool::worker&&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1F3D40: void __gnu_cxx::new_allocator<std::thread>::construct<std::thread, httplib::ThreadPool::worker>(std::thread*, httplib::ThreadPool::worker&&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1E8DAE: void std::allocator_traits<std::allocator<std::thread> >::construct<std::thread, httplib::ThreadPool::worker>(std::allocator<std::thread>&, std::thread*, httplib::ThreadPool::worker&&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1E8EC9: void std::vector<std::thread, std::allocator<std::thread> >::_M_realloc_insert<httplib::ThreadPool::worker>(__gnu_cxx::__normal_iterator<std::thread*, std::vector<std::thread, std::allocator<std::thread> > >, httplib::ThreadPool::worker&&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1DB9FD: void std::vector<std::thread, std::allocator<std::thread> >::emplace_back<httplib::ThreadPool::worker>(httplib::ThreadPool::worker&&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1968F9: httplib::ThreadPool::ThreadPool(unsigned long) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x19DB2D: httplib::Server::Server()::{lambda()#1}::operator()() const (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x208603: httplib::ThreadPool* std::__invoke_impl<httplib::ThreadPool*, httplib::Server::Server()::{lambda()#1}&>(std::__invoke_other, httplib::Server::Server()::{lambda()#1}&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== ==24138== 3,040 bytes in 10 blocks are possibly lost in loss record 549 of 561 ==24138== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==24138== by 0x40147D9: calloc (rtld-malloc.h:44) ==24138== by 0x40147D9: allocate_dtv (dl-tls.c:375) ==24138== by 0x40147D9: _dl_allocate_tls (dl-tls.c:634) ==24138== by 0x4E657B4: allocate_stack (allocatestack.c:430) ==24138== by 0x4E657B4: pthread_create@@GLIBC_2.34 (pthread_create.c:647) ==24138== by 0x4C5E328: std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30) ==24138== by 0x206F09: std::thread::thread<httplib::ThreadPool::worker, , void>(httplib::ThreadPool::worker&&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1F3D40: void __gnu_cxx::new_allocator<std::thread>::construct<std::thread, httplib::ThreadPool::worker>(std::thread*, httplib::ThreadPool::worker&&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1E8DAE: void std::allocator_traits<std::allocator<std::thread> >::construct<std::thread, httplib::ThreadPool::worker>(std::allocator<std::thread>&, std::thread*, httplib::ThreadPool::worker&&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1DB9B7: void std::vector<std::thread, std::allocator<std::thread> >::emplace_back<httplib::ThreadPool::worker>(httplib::ThreadPool::worker&&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1968F9: httplib::ThreadPool::ThreadPool(unsigned long) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x19DB2D: httplib::Server::Server()::{lambda()#1}::operator()() const (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x208603: httplib::ThreadPool* std::__invoke_impl<httplib::ThreadPool*, httplib::Server::Server()::{lambda()#1}&>(std::__invoke_other, httplib::Server::Server()::{lambda()#1}&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== by 0x1F6A4D: std::enable_if<std::__and_<std::__not_<std::is_void<httplib::TaskQueue*> >, std::is_convertible<std::__invoke_result<httplib::Server::Server()::{lambda()#1}&>::type, httplib::TaskQueue*> >::value, httplib::TaskQueue*>::type std::__invoke_r<httplib::TaskQueue*, httplib::Server::Server()::{lambda()#1}&>(httplib::Server::Server()::{lambda()#1}&) (in /home/sxp/shui/jcdzarm/webserver/main-new) ==24138== ==24138== LEAK SUMMARY: ==24138== definitely lost: 0 bytes in 0 blocks ==24138== indirectly lost: 0 bytes in 0 blocks ==24138== possibly lost: 7,296 bytes in 24 blocks ==24138== still reachable: 477,756 bytes in 1,210 blocks ==24138== of which reachable via heuristic: ==24138== length64 : 119,744 bytes in 438 blocks ==24138== suppressed: 0 bytes in 0 blocks ==24138== Reachable blocks (those to which a pointer was found) are not shown. ==24138== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==24138== ==24138== For lists of detected and suppressed errors, rerun with: -s ==24138== ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0) Segmentation fault
10-04
>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o: in function `CANopen::CANopenMaster::CANopenMaster(std::unique_ptr<CANopen::CANDriver, std::default_delete<CANopen::CANDriver> >, unsigned char)': 1>C:\shui\web\comm\x86\bb\aaa-demo\61-dp\11-dp\11-dp\..\..\CANopenMaster.cpp(12): error : undefined reference to `CANopen::CANopenBase::CANopenBase(std::unique_ptr<CANopen::CANDriver, std::default_delete<CANopen::CANDriver> >, unsigned char)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o: in function `CANopen::CANopenMaster::~CANopenMaster()': 1>C:\shui\web\comm\x86\bb\aaa-demo\61-dp\11-dp\11-dp\..\..\CANopenMaster.cpp(22): error : undefined reference to `CANopen::CANopenBase::~CANopenBase()' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o: in function `CANopen::CANopenMaster::onNMTStateChange(unsigned char, CANopen::NMTState)': 1>C:\shui\web\comm\x86\bb\aaa-demo\61-dp\11-dp\11-dp\..\..\CANopenMaster.cpp(357): error : undefined reference to `CANopen::CANopenBase::onNMTStateChange(unsigned char, CANopen::NMTState)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o: in function `CANopen::CANopenMaster::onEmergency(unsigned char, unsigned short, unsigned char, unsigned char const*)': 1>C:\shui\web\comm\x86\bb\aaa-demo\61-dp\11-dp\11-dp\..\..\CANopenMaster.cpp(363): error : undefined reference to `CANopen::CANopenBase::onEmergency(unsigned char, unsigned short, unsigned char, unsigned char const*)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o:(.data.rel.ro._ZTVN7CANopen13CANopenMasterE[_ZTVN7CANopen13CANopenMasterE]+0x20): undefined reference to `CANopen::CANopenBase::initialize()' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o:(.data.rel.ro._ZTVN7CANopen13CANopenMasterE[_ZTVN7CANopen13CANopenMasterE]+0x28): undefined reference to `CANopen::CANopenBase::start()' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o:(.data.rel.ro._ZTVN7CANopen13CANopenMasterE[_ZTVN7CANopen13CANopenMasterE]+0x30): undefined reference to `CANopen::CANopenBase::stop()' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o:(.data.rel.ro._ZTVN7CANopen13CANopenMasterE[_ZTVN7CANopen13CANopenMasterE]+0x38): undefined reference to `CANopen::CANopenBase::shutdown()' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o:(.data.rel.ro._ZTVN7CANopen13CANopenMasterE[_ZTVN7CANopen13CANopenMasterE]+0x40): undefined reference to `CANopen::CANopenBase::readObjectDictionary(unsigned short, unsigned char, std::vector<unsigned char, std::allocator<unsigned char> >&)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o:(.data.rel.ro._ZTVN7CANopen13CANopenMasterE[_ZTVN7CANopen13CANopenMasterE]+0x48): undefined reference to `CANopen::CANopenBase::writeObjectDictionary(unsigned short, unsigned char, std::vector<unsigned char, std::allocator<unsigned char> > const&)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o:(.data.rel.ro._ZTVN7CANopen13CANopenMasterE[_ZTVN7CANopen13CANopenMasterE]+0x50): undefined reference to `CANopen::CANopenBase::getNMTState() const' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o:(.data.rel.ro._ZTVN7CANopen13CANopenMasterE[_ZTVN7CANopen13CANopenMasterE]+0x58): undefined reference to `CANopen::CANopenBase::setNMTState(CANopen::NMTState)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o:(.data.rel.ro._ZTVN7CANopen13CANopenMasterE[_ZTVN7CANopen13CANopenMasterE]+0x60): undefined reference to `CANopen::CANopenBase::onPDOReceived(CO_CANrxMsg_t const*)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o:(.data.rel.ro._ZTVN7CANopen13CANopenMasterE[_ZTVN7CANopen13CANopenMasterE]+0x80): undefined reference to `CANopen::CANopenBase::onSYNCReceived(unsigned char)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenMaster.o:(.data.rel.ro._ZTIN7CANopen13CANopenMasterE[_ZTIN7CANopen13CANopenMasterE]+0x10): undefined reference to `typeinfo for CANopen::CANopenBase' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o: in function `CANopen::CANopenSlave::CANopenSlave(std::unique_ptr<CANopen::CANDriver, std::default_delete<CANopen::CANDriver> >, unsigned char)': 1>C:\shui\web\comm\x86\bb\aaa-demo\61-dp\11-dp\11-dp\..\..\CANopenSlave.cpp(8): error : undefined reference to `CANopen::CANopenBase::CANopenBase(std::unique_ptr<CANopen::CANDriver, std::default_delete<CANopen::CANDriver> >, unsigned char)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/11-dp/11-dp/../../CANopenSlave.cpp:11: undefined reference to `CANopen::CANopenBase::~CANopenBase()' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o: in function `CANopen::CANopenSlave::~CANopenSlave()': 1>C:\shui\web\comm\x86\bb\aaa-demo\61-dp\11-dp\11-dp\..\..\CANopenSlave.cpp(14): error : undefined reference to `CANopen::CANopenBase::~CANopenBase()' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o: in function `CANopen::CANopenSlave::onPDOReceived(CO_CANrxMsg_t const*)': 1>C:\shui\web\comm\x86\bb\aaa-demo\61-dp\11-dp\11-dp\..\..\CANopenSlave.cpp(172): error : undefined reference to `CANopen::CANopenBase::onPDOReceived(CO_CANrxMsg_t const*)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o: in function `CANopen::CANopenSlave::onSYNCReceived(unsigned char)': 1>C:\shui\web\comm\x86\bb\aaa-demo\61-dp\11-dp\11-dp\..\..\CANopenSlave.cpp(181): error : undefined reference to `CANopen::CANopenBase::onSYNCReceived(unsigned char)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o:(.data.rel.ro._ZTVN7CANopen12CANopenSlaveE[_ZTVN7CANopen12CANopenSlaveE]+0x20): undefined reference to `CANopen::CANopenBase::initialize()' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o:(.data.rel.ro._ZTVN7CANopen12CANopenSlaveE[_ZTVN7CANopen12CANopenSlaveE]+0x28): undefined reference to `CANopen::CANopenBase::start()' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o:(.data.rel.ro._ZTVN7CANopen12CANopenSlaveE[_ZTVN7CANopen12CANopenSlaveE]+0x30): undefined reference to `CANopen::CANopenBase::stop()' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o:(.data.rel.ro._ZTVN7CANopen12CANopenSlaveE[_ZTVN7CANopen12CANopenSlaveE]+0x38): undefined reference to `CANopen::CANopenBase::shutdown()' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o:(.data.rel.ro._ZTVN7CANopen12CANopenSlaveE[_ZTVN7CANopen12CANopenSlaveE]+0x40): undefined reference to `CANopen::CANopenBase::readObjectDictionary(unsigned short, unsigned char, std::vector<unsigned char, std::allocator<unsigned char> >&)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o:(.data.rel.ro._ZTVN7CANopen12CANopenSlaveE[_ZTVN7CANopen12CANopenSlaveE]+0x48): undefined reference to `CANopen::CANopenBase::writeObjectDictionary(unsigned short, unsigned char, std::vector<unsigned char, std::allocator<unsigned char> > const&)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o:(.data.rel.ro._ZTVN7CANopen12CANopenSlaveE[_ZTVN7CANopen12CANopenSlaveE]+0x50): undefined reference to `CANopen::CANopenBase::getNMTState() const' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o:(.data.rel.ro._ZTVN7CANopen12CANopenSlaveE[_ZTVN7CANopen12CANopenSlaveE]+0x58): undefined reference to `CANopen::CANopenBase::setNMTState(CANopen::NMTState)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o:(.data.rel.ro._ZTVN7CANopen12CANopenSlaveE[_ZTVN7CANopen12CANopenSlaveE]+0x68): undefined reference to `CANopen::CANopenBase::onEmergency(unsigned char, unsigned short, unsigned char, unsigned char const*)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o:(.data.rel.ro._ZTVN7CANopen12CANopenSlaveE[_ZTVN7CANopen12CANopenSlaveE]+0x70): undefined reference to `CANopen::CANopenBase::onNMTStateChange(unsigned char, CANopen::NMTState)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o:(.data.rel.ro._ZTVN7CANopen12CANopenSlaveE[_ZTVN7CANopen12CANopenSlaveE]+0x78): undefined reference to `CANopen::CANopenBase::onSDOTransfer(unsigned char, unsigned short, unsigned char, CANopen::SDOState)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/CANopenSlave.o:(.data.rel.ro._ZTIN7CANopen12CANopenSlaveE[_ZTIN7CANopen12CANopenSlaveE]+0x10): undefined reference to `typeinfo for CANopen::CANopenBase' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/obj/x64/Debug/master.o: in function `main': 1>C:\shui\web\comm\x86\bb\aaa-demo\61-dp\11-dp\11-dp\..\..\master.cpp(16): error : undefined reference to `CANopen::CANopenBase::setPDOReceivedCallback(std::function<void (unsigned int, std::vector<unsigned char, std::allocator<unsigned char> > const&, unsigned char)>)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/11-dp/11-dp/../../master.cpp:26: undefined reference to `CANopen::CANopenBase::setEmergencyCallback(std::function<void (unsigned char, CANopen::EmergencyCode const&)>)' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/11-dp/11-dp/../../master.cpp:32: undefined reference to `CANopen::CANopenBase::initialize()' 1>/usr/bin/ld : error : /home/sxp/projects/61-dp/11-dp/11-dp/../../master.cpp:33: undefined reference to `CANopen::CANopenBase::start()' 1>collect2 : error : ld returned 1 exit status
10-24
1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\..\61-dp\CANopenLinux\CANopenNode\301\CO_ODinterface.h(396,24): warning : | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(67,5): error : ‘CO_NMT_STATE_t’ does not name a type 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(67,5): error : 67 | CO_NMT_STATE_t nmt_state; 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(67,5): error : | ^~~~~~~~~~~~~~ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(112,5): error : ‘CO_SDO_MASTER_t’ does not name a type; did you mean ‘CO_SDO_state_t’? 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(112,5): error : 112 | CO_SDO_MASTER_t sdo_master_ = { 0 }; // SDO��վ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(112,5): error : | ^~~~~~~~~~~~~~~ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(112,5): error : | CO_SDO_state_t 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(114,5): error : ‘CO_EMCY_t’ does not name a type; did you mean ‘CO_EM_t’? 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(114,5): error : 114 | CO_EMCY_t emcy_ = { 0 }; // EMCYģ�� 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(114,5): error : | ^~~~~~~~~ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(114,5): error : | CO_EM_t 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(115,5): error : ‘CO_PDO_t’ does not name a type; did you mean ‘CO_RPDO_t’? 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(115,5): error : 115 | CO_PDO_t tpdo_[4] = { {0} }; // ����PDO 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(115,5): error : | ^~~~~~~~ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(115,5): error : | CO_RPDO_t 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(116,5): error : ‘CO_PDO_t’ does not name a type; did you mean ‘CO_RPDO_t’? 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(116,5): error : 116 | CO_PDO_t rpdo_[4] = { {0} }; // ����PDO 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(116,5): error : | ^~~~~~~~ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(116,5): error : | CO_RPDO_t 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(117,5): error : ‘CO_NODE_GUARD_t’ does not name a type; did you mean ‘CO_NODE_GUARDING_H’? 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(117,5): error : 117 | CO_NODE_GUARD_t node_guard_ = { 0 }; // �ڵ㱣�� 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(117,5): error : | ^~~~~~~~~~~~~~~ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(117,5): error : | CO_NODE_GUARDING_H 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(275,5): error : ‘CO_NMT_STATE_t’ does not name a type 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(275,5): error : 275 | CO_NMT_STATE_t getSlaveState(uint8_t node_id) { 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(275,5): error : | ^~~~~~~~~~~~~~ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(841,29): error : ‘CO_NMT_STATE_t’ has not been declared 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(841,29): error : 841 | const char* nmtStateStr(CO_NMT_STATE_t state) { 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(841,29): error : | ^~~~~~~~~~~~~~ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(111,23): error : invalid conversion from ‘int’ to ‘CO_NMT_internalState_t’ [-fpermissive] 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(111,23): error : 111 | CO_NMT_t nmt_ = { 0 }; // NMTģ�� 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(111,23): error : | ^ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(111,23): error : | | 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(111,23): error : | int 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(157,13): error : ‘CO_init’ was not declared in this scope; did you mean ‘init’? 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(157,13): error : 157 | if (CO_init(&co_, MASTER_NODE_ID, nullptr) != CO_OK) { 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(157,13): error : | ^~~~~~~ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(157,13): error : | init 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(157,55): error : ‘CO_OK’ was not declared in this scope 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(157,55): error : 157 | if (CO_init(&co_, MASTER_NODE_ID, nullptr) != CO_OK) { 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(157,55): error : | ^~~~~ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(163,38): error : ‘CO_NMT_MODE_MASTER’ was not declared in this scope 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(163,38): error : 163 | if (CO_NMT_init(&nmt_, &co_, CO_NMT_MODE_MASTER) != CO_OK) { 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(163,38): error : | ^~~~~~~~~~~~~~~~~~ 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(163,61): error : ‘CO_OK’ was not declared in this scope 1>C:\shui\web\comm\x86\bb\aaa-demo\62-dp\11-dp\11-dp\..\..\main_master.cpp(163,61): error : 163 | if (CO_NMT_init(&nmt_, &co_, CO_NMT_MODE_MASTER) != CO_OK)
10-25
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值