Otherwise this guide will not work for you. Important note: you need to open the ROS work space with vs code, not only your specific package. The command: "C:\Program Files\CMake\bin\cmake.EXE" -no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=C:\cygwin64\bin\x86_64-pc-cygwin-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\cygwin64\bin\x86_64-pc-cygwin-g++.In this post I am going to share my workflow and best practices for using Visual Studio Code as a development environment for ROS. CMake will not be able to correctly generate this project. See also "C:/Users/Mehrdad/Documents/PlatformIO/Projects/opencv2/build/CMakeFiles/CMakeError.log". See also "C:/Users/Mehrdad/Documents/PlatformIO/Projects/opencv2/build/CMakeFiles/CMakeOutput.log". Configuring incomplete, errors occurred! make: Leaving directory '/cygdrive/c/Users/Mehrdad/Documents/PlatformIO/Projects/opencv2/build/CMakeFiles/CMakeTmp' CMAKE_AR-NOTFOUND cr CMakeFiles/cmTC_9053f.dir/objects.a make: CMAKE_AR-NOTFOUND: No such file or directory "C:/Program Files/CMake/bin/cmake.exe" -E rm -f CMakeFiles/cmTC_9053f.dir/objects.a C:/cygwin64/bin/x86_64-pc-cygwin-gcc.exe -o CMakeFiles/cmTC_9053f.dir/testCCompiler.c.obj -c C:/Users/Mehrdad/Documents/PlatformIO/Projects/opencv2/build/CMakeFiles/CMakeTmp/testCCompiler.c Building C object CMakeFiles/cmTC_9053f.dir/testCCompiler.c.obj make: Entering directory '/cygdrive/c/Users/Mehrdad/Documents/PlatformIO/Projects/opencv2/build/CMakeFiles/CMakeTmp' Run Build Command(s):C:/cygwin64/bin/make.exe cmTC_9053f/fast & /usr/bin/make -f CMakeFiles/cmTC_9053f.dir/build.make CMakeFiles/cmTC_9053f.dir/build Change Dir: C:/Users/Mehrdad/Documents/PlatformIO/Projects/opencv2/build/CMakeFiles/CMakeTmp is not able to compile a simple test program. CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message): ![]() ![]() Check for working C compiler: C:/cygwin64/bin/x86_64-pc-cygwin-gcc.exe - broken Check for working C compiler: C:/cygwin64/bin/x86_64-pc-cygwin-gcc.exe Detecting C compiler ABI info - failed The CXX compiler identification is GNU 10.2.0 The C compiler identification is GNU 10.2.0 Not searching for unused variables given on the command line. Executing command: "C:\Program Files\CMake\bin\cmake.EXE" -no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=C:\cygwin64\bin\x86_64-pc-cygwin-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\cygwin64\bin\x86_64-pc-cygwin-g++.exe -Sc:/Users/Mehrdad/Documents/PlatformIO/Projects/opencv2 -Bc:/Users/Mehrdad/Documents/PlatformIO/Projects/opencv2/build -G "Unix Makefiles" Those are screenshots of the problem Configuring folder: opencv2 #add_library(OPENCV_LIBS $(OpenCV_DIR\圆4\vc16\lib)) ![]() #INCLUDE_DIRECTORIES($(OpenCV_DIR\圆4\vc16\lib)) Target_link_libraries(myopencv $OPENCV_LIBS) Include_directories($(OpenCV_DIR\圆4\vc16\lib)) Include_directories($(OpenCV_DIR\include\opencv2)) My code cmake_minimum_required(VERSION 3.0.0) I use the following CMake file to debug my simple code, however, it can not detect the header library even manually set the header path in c_cpp_properties.json file My VSCode compiler and make tools properly installed and work ![]() I intend to work with OpenCV C++ code with VScode in Windows 11
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |