Ask Your Question
0

How do I install OpenCV through RStudio?

asked 2020-05-19 03:00:14 -0600

nbajwa gravatar image

Greetings, I've recently learned of your package through the "wholebrain" software by Daniel Firth. The software utilizes your package to segment and register cells in microscope images. I've tried to install openCV through RStudio itself - however - I've run into this error:

OpenCV will be installed in C:/Program Files/R/R-4.0.0/library/opencv Removing old OpenCV installation. trying URL 'https://github.com/opencv/opencv/arch...' Content type 'application/x-gzip' length unknown downloaded 83.4 MB

-- The CXX compiler identification is unknown -- The C compiler identification is unknown CMake Error at CMakeLists.txt:99 (enable_language): The CMAKE_CXX_COMPILER:

tools40/usr/mingw_64/bin/g++.exe

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:99 (enable_language): The CMAKE_C_COMPILER:

tools40/usr/mingw_64/bin/gcc.exe

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred! See also "C:/Users/Navdeep/AppData/Local/Temp/RtmpUnTlC8/opencv-4.1.2/build64/CMakeFiles/CMakeOutput.log". See also "C:/Users/Navdeep/AppData/Local/Temp/RtmpUnTlC8/opencv-4.1.2/build64/CMakeFiles/CMakeError.log". -- The CXX compiler identification is unknown -- The C compiler identification is unknown CMake Error at CMakeLists.txt:99 (enable_language): The CMAKE_CXX_COMPILER:

tools40/usr/mingw_32/bin/g++.exe

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:99 (enable_language): The CMAKE_C_COMPILER:

tools40/usr/mingw_32/bin/gcc.exe

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred! See also "C:/Users/Navdeep/AppData/Local/Temp/RtmpUnTlC8/opencv-4.1.2/build32/CMakeFiles/CMakeOutput.log". See also "C:/Users/Navdeep/AppData/Local/Temp/RtmpUnTlC8/opencv-4.1.2/build32/CMakeFiles/CMakeError.log". [1] FALSE

I'm running on Windows 10. How do I identify my CXX and C compilers?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-05-19 03:38:42 -0600

berak gravatar image

updated 2020-05-19 04:12:49 -0600

How do I identify my CXX and C compilers?

it expects the full path to g++ / gcc tools40/usr/mingw_64/bin/g++.exe is only the last part of it

  • clean your build folder
  • run cmake-gui, it will open a box where you can fill in the compiler locations (complete path to g++ / gcc)
  • maybe better avoid rstudio for building opencv libs, and let cmake generate mingw makefiles instead.

    (then run mingw32-make install from a cmdline)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-05-19 03:00:14 -0600

Seen: 710 times

Last updated: May 19 '20