Skip to content

cmake .. && make failed #11

@zfadminer

Description

@zfadminer

i have installed all the dependeces,but when i run " cmake .. && make“ ,it failed show:

[ 33%] Building CXX object CMakeFiles/pid.dir/src/main.cpp.o
/home/adminer/CarND-PID-Control-Project-master/src/main.cpp: In lambda function:
/home/adminer/CarND-PID-Control-Project-master/src/main.cpp:51:18: warning: unused variable ‘speed’ [-Wunused-variable]
double speed = std::stod(j[1]["speed"].getstd::string());
^~~~~
/home/adminer/CarND-PID-Control-Project-master/src/main.cpp:52:18: warning: unused variable ‘angle’ [-Wunused-variable]
double angle = std::stod(j[1]["steering_angle"].getstd::string());
^~~~~
/home/adminer/CarND-PID-Control-Project-master/src/main.cpp: In function ‘int main()’:
/home/adminer/CarND-PID-Control-Project-master/src/main.cpp:77:4: error: no matching function for call to ‘uWS::Hub::onMessage(main()::<lambda(uWS::WebSocket, char*, size_t, uWS::OpCode)>)’
});
^
In file included from /usr/include/uWS/Hub.h:4:0,
from /usr/include/uWS/uWS.h:4,
from /home/adminer/CarND-PID-Control-Project-master/src/main.cpp:1:
/usr/include/uWS/Group.h:69:10: note: candidate: void uWS::Group::onMessage(std::function<void(uWS::WebSocket, char, unsigned int, uWS::OpCode)>) [with bool isServer = true]
void onMessage(std::function<void(WebSocket , char , size_t, OpCode)> handler);
^~~~~~~~~
/usr/include/uWS/Group.h:69:10: note: no known conversion for argument 1 from ‘main()::<lambda(uWS::WebSocket, char
, size_t, uWS::OpCode)>’ to ‘std::function<void(uWS::WebSocket
, char*, unsigned int, uWS::OpCode)>’
/usr/include/uWS/Group.h:69:10: note: candidate: void uWS::Group::onMessage(std::function<void(uWS::WebSocket, char, unsigned int, uWS::OpCode)>) [with bool isServer = false]
/usr/include/uWS/Group.h:69:10: note: no known conversion for argument 1 from ‘main()::<lambda(uWS::WebSocket, char*, size_t, uWS::OpCode)>’ to ‘std::function<void(uWS::WebSocket, char, unsigned int, uWS::OpCode)>’
/home/adminer/CarND-PID-Control-Project-master/src/main.cpp:96:4: error: no matching function for call to ‘uWS::Hub::onConnection(main()::<lambda(uWS::WebSocket, uWS::HttpRequest)>)’
});
^
In file included from /usr/include/uWS/Hub.h:4:0,
from /usr/include/uWS/uWS.h:4,
from /home/adminer/CarND-PID-Control-Project-master/src/main.cpp:1:
/usr/include/uWS/Group.h:67:10: note: candidate: void uWS::Group::onConnection(std::function<void(uWS::WebSocket, uWS::HttpRequest)>) [with bool isServer = true]
void onConnection(std::function<void(WebSocket , HttpRequest)> handler);
^~~~~~~~~~~~
/usr/include/uWS/Group.h:67:10: note: no known conversion for argument 1 from ‘main()::<lambda(uWS::WebSocket, uWS::HttpRequest)>’ to ‘std::function<void(uWS::WebSocket
, uWS::HttpRequest)>’
/usr/include/uWS/Group.h:67:10: note: candidate: void uWS::Group::onConnection(std::function<void(uWS::WebSocket
, uWS::HttpRequest)>) [with bool isServer = false]
/usr/include/uWS/Group.h:67:10: note: no known conversion for argument 1 from ‘main()::<lambda(uWS::WebSocket, uWS::HttpRequest)>’ to ‘std::function<void(uWS::WebSocket, uWS::HttpRequest)>’
/home/adminer/CarND-PID-Control-Project-master/src/main.cpp:101:4: error: no matching function for call to ‘uWS::Hub::onDisconnection(main()::<lambda(uWS::WebSocket, int, char
, size_t)>)’
});
^
In file included from /usr/include/uWS/Hub.h:4:0,
from /usr/include/uWS/uWS.h:4,
from /home/adminer/CarND-PID-Control-Project-master/src/main.cpp:1:
/usr/include/uWS/Group.h:70:10: note: candidate: void uWS::Group::onDisconnection(std::function<void(uWS::WebSocket, int, char, unsigned int)>) [with bool isServer = true]
void onDisconnection(std::function<void(WebSocket , int code, char message, size_t length)> handler);
^~~~~~~~~~~~~~~
/usr/include/uWS/Group.h:70:10: note: no known conversion for argument 1 from ‘main()::<lambda(uWS::WebSocket, int, char
, size_t)>’ to ‘std::function<void(uWS::WebSocket
, int, char*, unsigned int)>’
/usr/include/uWS/Group.h:70:10: note: candidate: void uWS::Group::onDisconnection(std::function<void(uWS::WebSocket, int, char, unsigned int)>) [with bool isServer = false]
/usr/include/uWS/Group.h:70:10: note: no known conversion for argument 1 from ‘main()::<lambda(uWS::WebSocket, int, char*, size_t)>’ to ‘std::function<void(uWS::WebSocket, int, char, unsigned int)>’
CMakeFiles/pid.dir/build.make:86: recipe for target 'CMakeFiles/pid.dir/src/main.cpp.o' failed
make[2]: *** [CMakeFiles/pid.dir/src/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pid.dir/all' failed
make[1]: *** [CMakeFiles/pid.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

who can help me
thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions