zhxt / cyber-rt

Redistributed Apollo CyberRT, built with CMake.
Apache License 2.0
38 stars 22 forks source link

build dependencies error #8

Open Yanniy opened 3 years ago

Yanniy commented 3 years ago

Error: CyberRT/cyber-rt-master/build/external/src/fastrtps/include/fastrtps/rtps/writer/RTPSWriter.h:66:54: error: ‘function’ in namespace ‘std’ does not name a template type RTPS_DllAPI CacheChange_t* new_change(const std::function<uint32_t()>& dataCdrSerializedSize, ^~~~ 2021-07-21_15-42

Solution: 1.I just go to the build folder and open <build/external/src/fastrtps/include/fastrtps/rtps/writer/RTPSWriter.h>. 2.Add #include in the head file. 3.make

I don't know how to fully fixed it. If I delete the build folder, I need to add this manually.

zhxt commented 2 years ago

it should be caused by changes of compiler, I guess

tiny-xk commented 2 years ago

I have same error, 1.open <build/external/src/fastrtps/include/fastrtps/rtps/writer/RTPSWriter.h>. 2.add [#include functional] 3.make 4.well done! I think the compiler don't support C++11

zongkai28 commented 1 year ago

I have same error, 1.open <build/external/src/fastrtps/include/fastrtps/rtps/writer/RTPSWriter.h>. 2.add [#include functional] 3.make 4.well done! I think the compiler don't support C++11

it work ok for me.

i use a ubuntu 18.04 installed in wsl