Linking CXX executable ../../bin/opencv_perf_dnn
时间: 2023-12-20 22:06:58 浏览: 177
这是一个编译链接的命令,用于将 C++ 源代码编译为可执行文件。在这个例子中,编译器正在链接一个名为 "opencv_perf_dnn" 的可执行文件。
要成功执行此命令,需要确保你已经安装了适当的编译器和相关的库文件,并且已经正确配置了编译环境。具体的步骤可能因操作系统和开发环境而异。你可能需要查阅相关的文档或参考示例代码来获得更多细节和指导。
相关问题
In file included from /home/acceler/code/apollo_ros/apollo_ros/src/apollo.ros-1.0.0-master/apollo_common/include/apollo_common/apollo_app.h:46:0, from /home/acceler/code/apollo_ros/apollo_ros/src/apollo.ros-1.0.0-master/apollo_common/src/apollo_app.cc:33: /home/acceler/code/apollo_ros/apollo_ros/src/apollo.ros-1.0.0-master/apollo_common/include/apollo_common/log.h:40:10: fatal error: glog/logging.h: No such file or directory #include <glog/logging.h> ^~~~~~~~~~~~~~~~ compilation terminated. apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/build.make:62: recipe for target 'apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/src/apollo_app.cc.o' failed make[2]: *** [apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/src/apollo_app.cc.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /home/acceler/code/apollo_ros/apollo_ros/src/apollo.ros-1.0.0-master/apollo_common/include/apollo_common/adapters/adapter_manager.h:48:0, from /home/acceler/code/apollo_ros/apollo_ros/src/apollo.ros-1.0.0-master/apollo_common/src/adapters/adapter_manager.cc:33: /home/acceler/code/apollo_ros/apollo_ros/src/apollo.ros-1.0.0-master/apollo_common/include/apollo_common/adapters/adapter.h:49:10: fatal error: glog/logging.h: No such file or directory #include <glog/logging.h> ^~~~~~~~~~~~~~~~ compilation terminated. apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/build.make:110: recipe for target 'apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/src/adapters/adapter_manager.cc.o' failed make[2]: *** [apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/src/adapters/adapter_manager.cc.o] Error 1 CMakeFiles/Makefile2:3894: recipe for target 'apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/all' failed make[1]: *** [apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 54%] Linking CXX executable /home/acceler/code/apollo_ros/apollo_ros/devel/lib/IntegratedNavigation/IntegratedNavigation_node [ 54%] Built target IntegratedNavigation_node [ 55%] Linking CXX executable /home/acceler/code/apollo_ros/apollo_ros/devel/lib/TimeSynchronierProcess/timeSynchronierProcess_node [ 55%] Built target timeSynchronierProcess_node Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed
It seems like there is a compilation error in your code. The error message indicates that the file "glog/logging.h" is not found. This file is part of the Google Logging Library (glog) and needs to be installed in order to compile your code successfully.
To resolve this issue, you can follow these steps:
1. Make sure that the glog library is installed on your system. You can check this by running the following command in your terminal:
```
dpkg -l libgoogle-glog-dev
```
If it is not installed, you can install it using the package manager specific to your system (e.g., apt for Ubuntu):
```
sudo apt-get install libgoogle-glog-dev
```
2. After installing the glog library, try compiling your code again. If the error persists, make sure that the glog library directory is included in the compilation flags. You can add the following line to your CMakeLists.txt file:
```
include_directories(/path/to/glog/include)
```
Replace "/path/to/glog/include" with the actual path to the glog library include directory on your system.
3. Save the changes to your CMakeLists.txt file and try compiling your code again.
If you continue to encounter issues, please provide more details about your development environment and the steps you have already taken to troubleshoot the problem.
CMake Error at /home/jianhui.ge/cmake-3.18.0-Linux-x86_64/share/cmake-3.18/Modules/CMakeTestCXXCompiler.cmake:59 (message): The C++ compiler "/usr/bin/c++" is not able to compile a simple test program. It fails with the following output: Change Dir: /home/jianhui.ge/XNNPACK/zhc_test/build/linux_x86/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/make cmTC_ff260/fast && /usr/bin/make -f CMakeFiles/cmTC_ff260.dir/build.make CMakeFiles/cmTC_ff260.dir/build make[1]: Entering directory '/home/jianhui.ge/XNNPACK/zhc_test/build/linux_x86/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_ff260.dir/testCXXCompiler.cxx.o /usr/bin/c++ -fPIE -o CMakeFiles/cmTC_ff260.dir/testCXXCompiler.cxx.o -c /home/jianhui.ge/XNNPACK/zhc_test/build/linux_x86/CMakeFiles/CMakeTmp/testCXXCompiler.cxx Linking CXX executable cmTC_ff260 /home/jianhui.ge/cmake-3.18.0-Linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ff260.dir/link.txt --verbose=1 /usr/bin/c++ -llog -lz CMakeFiles/cmTC_ff260.dir/testCXXCompiler.cxx.o -o cmTC_ff260 /usr/bin/ld: cannot find -llog collect2: error: ld returned 1 exit status CMakeFiles/cmTC_ff260.dir/build.make:105: recipe for target 'cmTC_ff260' failed make[1]: *** [cmTC_ff260] Error 1 make[1]: Leaving directory '/home/jianhui.ge/XNNPACK/zhc_test/build/linux_x86/CMakeFiles/CMakeTmp' Makefile:140: recipe for target 'cmTC_ff260/fast' failed make: *** [cmTC_ff260/fast] Error 2
这个问题是由于 C++ 编译器 "/usr/bin/c++" 无法编译一个简单的测试程序所导致的。并且在链接过程中找不到名为 'liblog' 的库。你可以尝试以下步骤来解决这个问题:
1. 确保你的系统中已经安装了 C++ 编译器。你可以通过运行以下命令来检查:
```
which c++
```
如果没有输出路径,说明你需要安装 C++ 编译器。你可以通过安装适合你系统的 C++ 编译器来解决这个问题。
2. 确保 'liblog' 库已经安装并且可以在编译过程中被找到。你可以通过运行以下命令来确认是否已安装该库:
```
ldconfig -p | grep liblog
```
如果没有输出结果,说明你需要安装 'liblog' 库。你可以通过适合你系统的包管理器或者手动编译安装该库。
3. 如果 'liblog' 库已经安装但是仍然无法找到,你可以尝试在编译命令中显式地指定库的路径。例如,假设 'liblog' 库的路径是 '/path/to/liblog',你可以在编译命令中添加 `-L/path/to/liblog` 来指定库的路径。
请尝试上述步骤来解决问题,如果仍然遇到困难,请提供更多的上下文信息,以便我能够更好地帮助你。
阅读全文