udacity / CarND-Extended-Kalman-Filter-Project

Self-Driving Car Nanodegree Program Starter Code for the Extended Kalman Filter Project
MIT License
335 stars 1.56k forks source link

Error compiling the code on MacOS 10.10.5 and cmake version 3.8.1 #32

Closed EmmyLau closed 5 years ago

EmmyLau commented 7 years ago

Here is the error that i got:

cala-am02024907:build lauc136$ make Scanning dependencies of target ExtendedKF [ 20%] Building CXX object CMakeFiles/ExtendedKF.dir/src/main.cpp.o /Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:41:5: error: no matching member function for call to 'onMessage' h.onMessage([&fusionEKF,&tools,&estimations,&ground_truth](uWS::WebSoc... ^~~ /usr/local/include/uWS/Group.h:69:10: note: candidate function not viable: no known conversion from '(lambda at /Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:41:15)' to 'std::function<void (WebSocket , char , size_t, OpCode)>' for 1st argument void onMessage(std::function<void(WebSocket , char , siz... ^ /usr/local/include/uWS/Group.h:69:10: note: candidate function not viable: no known conversion from '(lambda at /Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:41:15)' to 'std::function<void (WebSocket , char , size_t, OpCode)>' for 1st argument void onMessage(std::function<void(WebSocket , char , siz... ^ /Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:165:5: error: no matching member function for call to 'onConnection' h.onConnection([&h](uWS::WebSocket ws, uWS::HttpRequest req) { ^~~~~~ /usr/local/include/uWS/Group.h:67:10: note: candidate function not viable: no known conversion from '(lambda at /Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:165:18)' to 'std::function<void (WebSocket , HttpRequest)>' for 1st argument void onConnection(std::function<void(WebSocket , HttpRequ... ^ /usr/local/include/uWS/Group.h:67:10: note: candidate function not viable: no known conversion from '(lambda at /Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:165:18)' to 'std::function<void (WebSocket , HttpRequest)>' for 1st argument void onConnection(std::function<void(WebSocket , HttpRequ... ^ /Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:169:5: error: no matching member function for call to 'onDisconnection' h.onDisconnection([&h](uWS::WebSocket ws, int code, char ... ^~~~~ /usr/local/include/uWS/Group.h:70:10: note: candidate function not viable: no known conversion from '(lambda at /Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:169:21)' to 'std::function<void (WebSocket , int, char , size_t)>' for 1st argument void onDisconnection(std::function<void(WebSocket , int c... ^ /usr/local/include/uWS/Group.h:70:10: note: candidate function not viable: no known conversion from '(lambda at /Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:169:21)' to 'std::function<void (WebSocket , int, char , size_t)>' for 1st argument void onDisconnection(std::function<void(WebSocket , int c... ^ 3 errors generated. make[2]: [CMakeFiles/ExtendedKF.dir/src/main.cpp.o] Error 1 make[1]: [CMakeFiles/ExtendedKF.dir/all] Error 2 make: *** [all] Error 2 cala-am02024907:build lauc136$

hmily1119 commented 7 years ago

This patch should fix the issue: https://github.com/udacity/CarND-Extended-Kalman-Filter-Project/pull/40

ahuifragoso commented 7 years ago

i have the same error, did you fix it?

hmily1119 commented 7 years ago

Hi, Yes I run the install-mac.sh and that downgrade the uWebSocket library to the version compatible with the project. If you use Linux instead there is another instqll file for it. Good luck.

On Jun 18, 2017 7:28 PM, "ahuifragoso" notifications@github.com wrote:

i have the same error, did you fix it?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/udacity/CarND-Extended-Kalman-Filter-Project/issues/32#issuecomment-309291009, or mute the thread https://github.com/notifications/unsubscribe-auth/AIVHQO-xmdW5s9sh3YF06_tICgGXMAqPks5sFV5SgaJpZM4NWSuM .

emmyclau commented 7 years ago

Thanks @hmily1119, the patch fixed the problem i had.

I was running it on mac and I had to add the path to the openssl in the install-mac.sh

cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib ..

mvirgo commented 5 years ago

Looks like no further recent comments, so going to close out. Additionally, since we now have a classroom workspace, that should help to alleviate any headaches depending on OS.