zhujun98 / behavior-and-path-planning

Self-Driving Car Nanodegree
GNU General Public License v3.0
15 stars 5 forks source link

fatal error: uWS/uWS.h: No such file or directory #1

Closed kk2491 closed 5 years ago

kk2491 commented 5 years ago

Hi,

Thanks for the useful repository on Path and behavioral planning.

I am getting the below error when I try to build the project using the given steps.

user@computer:~/Github_Repos/behavior-and-path-planning/build$ cmake .. && make
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/Github_Repos/behavior-and-path-planning/build
[  4%] Building CXX object CMakeFiles/path_planning.dir/src/main.cpp.o
/home/user/Github_Repos/behavior-and-path-planning/src/main.cpp:6:21: fatal error: uWS/uWS.h: No such file or directory
 #include <uWS/uWS.h>
                     ^
compilation terminated.
CMakeFiles/path_planning.dir/build.make:62: recipe for target 'CMakeFiles/path_planning.dir/src/main.cpp.o' failed
make[2]: *** [CMakeFiles/path_planning.dir/src/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/path_planning.dir/all' failed
make[1]: *** [CMakeFiles/path_planning.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

After doing some googling, I found that below solution would fix the error.

cd uWebSockets
# git checkout e94b6e1
mkdir build
cd build
cmake ..
make 
sudo make install

However when I try to implement the above solution, I am getting error as given as I dont see any CMakeLists.txt in the directory.

user@computer:~/Github_Repos/uWebSockets/build$ cmake ..
CMake Error: The source directory "/home/user/Github_Repos/uWebSockets" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

Could you please help me get this fixed.

Thank you, KK

kk2491 commented 5 years ago

Update :

I am able to fix the error by following below steps.

cd uWebSockets
git checkout e94b6e1
mkdir build
cd build
cmake ..
make 
sudo make install

Thank you, KK

bobo7727 commented 4 years ago

Install uWebSockets

See Detail: https://github.com/udacity/CarND-Path-Planning-Project/blob/master/install-ubuntu.sh

sudo apt-get install libuv1-dev libssl-dev libz-dev git clone https://github.com/uWebSockets/uWebSockets cd uWebSockets git checkout e94b6e1 #Important,CMakeList.txt in this commit. mkdir build cd build cmake .. make sudo make install sudo ln -s /usr/lib64/libuWS.so /usr/lib/libuWS.so #Important, link libuWS.so sudo rm -r uWebSockets