I was trying to compile ROS melodic from source following the instruction on the official website. And I ran into a compiler error stated [here](https://answers.ros.org/question/311685/cmake-compile-error-pthread-not-found-how-to-tell-the-compiler-to-look-for-pthread-lib/) and I need to modify the libraries it( pthread instead of -lpthread) is trying to locate. Because a post on [StackOverflow](https://stackoverflow.com/questions/1662909/undefined-reference-to-pthread-create-in-linux) stated that the syntax for gcc works differently.
↧