baidu / boteye_driver

3 stars 6 forks source link

关于yaml-cpp版本 #3

Open gbdpf opened 5 years ago

gbdpf commented 5 years ago

您好, 我在编译app时, 出现以下问题: ../../libs_x86_64_14.04/libxpparam.so:对‘YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder>)’未定义的引用

应该我的yaml-cpp版本问题, 我试过0.6.2 0.6.0 0.5.3 0.5.0四个版本,好像都不好使....

mingyux commented 5 years ago

libxpparam.so was compiled with yaml-cpp-0.5.3. Please give it a try again and let us know if it is still not working.

gbdpf commented 5 years ago

Thx. I have installed yaml-cpp-0.5.3 on my device. Finally, I found your CMakeLists.txt file did not link the library of yaml-cpp. So I add the following sentence in CMakeLists, and It works:

 find_package(yaml-cpp)
    ...
 target_link_libraries(${PROJECT_NAME}
    ...
    ${YAML_CPP_LIBRARIES}

Anyway, It's not a big problem.

HansomHu commented 5 years ago

@dpfzju 你好,请问你编译的系统版本是Ubuntu14.04还是16.04,可以详细说一下你的编译过程吗,在我的机器上没有出现错误警告。

gbdpf commented 5 years ago

系统是14.04. 忘了说了, 我修改的是: _app/depthdemo/CMakeLists.txt

bruceche11 commented 5 years ago

我的16.04也出现了上述问题,按照楼上的修改了后,还是不行

HansomHu commented 5 years ago

@bruceche11 你在进行cmake时是否有提示找到了yaml库?能否将log贴上来看看?

bruceche11 commented 5 years ago

app/depth_demo/CMakeLists.txt : set(yaml-cpp_DIR /home/data/Downloads/yaml-cpp-release-0.5.3/build) find_package(yaml-cpp REQUIRED) MESSAGE(STATUS "yaml_INCLUDE_DIR: ${YAML_CPP_INCLUDE_DIR}") MESSAGE(STATUS "yaml_libraries: ${YAML_CPP_LIBRARIES}") and the " cmake .." like this: -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- CMAKE_MODULE_PATH: /home/data/ws_bruce/boteye_driver/app/cmake/Modules/ -- OpenCV_INCLUDE_DIRS: /opt/opencv3.0.0/include/opencv;/opt/opencv3.0.0/include -- Found Glog: /usr/include
-- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE_RELEASE -- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE_RELEASE - Success -- Found Gflags: /usr/include
-- Found Eigen: /usr/include/eigen3 (Required is at least version "2.91.0") -- DRIVER_LIBS: /home/data/ws_bruce/boteye_driver/build/libxpdriver.so -- yaml_INCLUDE_DIR: /usr/lib/x86_64-linux-gnu/cmake/yaml-cpp/../../../../include -- yaml_libraries: yaml-cpp -- Configuring done -- Generating done and the "make" like this: [ 12%] Building CXX object CMakeFiles/driver_demo.dir/driver_demo.cpp.o [ 25%] Linking CXX executable driver_demo [ 25%] Built target driver_demo Scanning dependencies of target depth_demo [ 37%] Building CXX object depth_demo/CMakeFiles/depth_demo.dir/depth_demo.cpp.o [ 50%] Linking CXX executable depth_demo ../../libs/libxpparam.so: undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr)' collect2: error: ld returned 1 exit status depth_demo/CMakeFiles/depth_demo.dir/build.make:118: recipe for target 'depth_demo/depth_demo' failed make[2]: [depth_demo/depth_demo] Error 1 CMakeFiles/Makefile2:122: recipe for target 'depth_demo/CMakeFiles/depth_demo.dir/all' failed make[1]: [depth_demo/CMakeFiles/depth_demo.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

bruceche11 commented 5 years ago

screenshot from 2018-10-31 16-11-22 this is my screen capture of my install of yaml-cpp-0.5.3

bruceche11 commented 5 years ago

@HansomHu buhaoyisiha,gongzuojishangmeiyouzhuangsougou

HansomHu commented 5 years ago

Please make sure about the following things:

  1. Install yaml to default path, i.e. all headers to /usr/local/include/yaml-cpp/ and libraries to /usr/local/lib/. You can reference to install.txt in yaml-cpp-0.5.3. We suggest that compile & install from source file.
  2. Download the latest code which has already fixed this issue, and try again.
  3. Please follow the steps we provided to compile and build the boteye_driver.
bruceche11 commented 5 years ago

Hi, @HansomHu Thank u for your work! But still not work . This time is like this: screenshot from 2018-10-31 17-46-00

and this is my yaml-cpp: screenshot from 2018-10-31 17-50-51

HansomHu commented 5 years ago

Have you empty your build folder? Please clear the build folder and redo cmake .. & make. Actually, libyaml-cpp.so is a symbolic link to libyaml-cpp.so.0.5.3, please check.

HansomHu commented 5 years ago

@bruceche11 Do you have built the repo successfully? Please let us know, thanks.

bruceche11 commented 5 years ago

@bruceche11 Do you have built the repo successfully? Please let us know, thanks.

Sorry , busy with other work. but still not working, still that question. I see that libxpparam.so was compiled with yaml-cpp-0.5.3, perhaps something is wrong with it.

old-walnut commented 5 years ago

Please make sure about the following things:

  1. Install yaml to default path, i.e. all headers to /usr/local/include/yaml-cpp/ and libraries to /usr/local/lib/. You can reference to install.txt in yaml-cpp-0.5.3. We suggest that compile & install from source file.
  2. Download the latest code which has already fixed this issue, and try again.
  3. Please follow the steps we provided to compile and build the boteye_driver.

我按这个步骤,还是不行!还是这个问题!!

gocpplua commented 3 years ago

Please make sure about the following things:

  1. Install yaml to default path, i.e. all headers to /usr/local/include/yaml-cpp/ and libraries to /usr/local/lib/. You can reference to install.txt in yaml-cpp-0.5.3. We suggest that compile & install from source file.
  2. Download the latest code which has already fixed this issue, and try again.
  3. Please follow the steps we provided to compile and build the boteye_driver.

我按这个步骤,还是不行!还是这个问题!!

我也是,还是不行

gocpplua commented 3 years ago

Please make sure about the following things:

  1. Install yaml to default path, i.e. all headers to /usr/local/include/yaml-cpp/ and libraries to /usr/local/lib/. You can reference to install.txt in yaml-cpp-0.5.3. We suggest that compile & install from source file.
  2. Download the latest code which has already fixed this issue, and try again.
  3. Please follow the steps we provided to compile and build the boteye_driver.

我按这个步骤,还是不行!还是这个问题!!

我也是,还是不行

yaml-cpp 0.7.0 添加下面的代码即可解决

YAML::BadConversion::~BadConversion()
{
}

void  YAML::detail::node_data::convert_to_map(const shared_memory_holder& pMemory)
{
}
wangshuangbin commented 2 years ago

Please make sure about the following things:

  1. Install yaml to default path, i.e. all headers to /usr/local/include/yaml-cpp/ and libraries to /usr/local/lib/. You can reference to install.txt in yaml-cpp-0.5.3. We suggest that compile & install from source file.
  2. Download the latest code which has already fixed this issue, and try again.
  3. Please follow the steps we provided to compile and build the boteye_driver.

我按这个步骤,还是不行!还是这个问题!!

我也是,还是不行

yaml-cpp 0.7.0 添加下面的代码即可解决

YAML::BadConversion::~BadConversion()
{
}

void  YAML::detail::node_data::convert_to_map(const shared_memory_holder& pMemory)
{
}

hello, which file should we put the code into?

wangshuangbin commented 2 years ago

Please make sure about the following things:

  1. Install yaml to default path, i.e. all headers to /usr/local/include/yaml-cpp/ and libraries to /usr/local/lib/. You can reference to install.txt in yaml-cpp-0.5.3. We suggest that compile & install from source file.
  2. Download the latest code which has already fixed this issue, and try again.
  3. Please follow the steps we provided to compile and build the boteye_driver.

我按这个步骤,还是不行!还是这个问题!!

我也是,还是不行

yaml-cpp 0.7.0 添加下面的代码即可解决

YAML::BadConversion::~BadConversion()
{
}

void  YAML::detail::node_data::convert_to_map(const shared_memory_holder& pMemory)
{
}

thank you already fixed!!!

a1wj1 commented 1 year ago

hello, which file should we put the code ?

YAML::BadConversion::~BadConversion() { }

void YAML::detail::node_data::convert_to_map(const shared_memory_holder& pMemory) { }