2

I am running MRO 3.5.0 on Win10, and trying to install a package image.CannyImage from bnosac/image on the github. But it keeps reporting fatal errors as following.

* installing *source* package 'image.CannyEdges' ...
** libs
c:/Rtools/mingw_64/bin/g++ -m64 -I"C:/PROGRA~1/MICROS~1/ROPEN~1/R-35~1.0/include" -DNDEBUG  -I"C:/Users/eric1/Documents/R/win-library/3.5/Rcpp/include"   -I"C:/swarm/workspace/External-R-3.5.0/vendor/extsoft/include"     -O2 -Wall  -mtune=core2 -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_64/bin/gcc -m64 -I"C:/PROGRA~1/MICROS~1/ROPEN~1/R-35~1.0/include" -DNDEBUG  -I"C:/Users/eric1/Documents/R/win-library/3.5/Rcpp/include"   -I"C:/swarm/workspace/External-R-3.5.0/vendor/extsoft/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c adsf.c -o adsf.o
c:/Rtools/mingw_64/bin/g++ -m64 -I"C:/PROGRA~1/MICROS~1/ROPEN~1/R-35~1.0/include" -DNDEBUG  -I"C:/Users/eric1/Documents/R/win-library/3.5/Rcpp/include"   -I"C:/swarm/workspace/External-R-3.5.0/vendor/extsoft/include"     -O2 -Wall  -mtune=core2 -c rcpp_canny.cpp -o rcpp_canny.o
In file included from rcpp_canny.cpp:13:0:
canny.h:8:19: fatal error: fftw3.h: No such file or directory
 #include <fftw3.h>
                   ^
compilation terminated.
make: *** [C:/PROGRA~1/MICROS~1/ROPEN~1/R-35~1.0/etc/x64/Makeconf:215: rcpp_canny.o] Error 1
ERROR: compilation failed for package 'image.CannyEdges'
* removing 'C:/Users/eric1/Documents/R/win-library/3.5/image.CannyEdges'
In R CMD INSTALL
Installation failed: Command failed (1)

                   ^
compilation terminated.

enter image description here

Google says I can solve the issue by sudo apt-get remove libfftw3-dev. Unfortunately, I am on Windows, and some advised, apply lib /machine:i386 /def:libfftw3-3.def on cmd mode. Ouch, there is no such command or file called lib.exe on Win10. Please advise, how I can solve this issue on my Win10+MRO system. Thanks.

neilfws
  • 32,751
  • 5
  • 50
  • 63
Grec001
  • 1,111
  • 6
  • 20
  • If you were using Linux, you would want `sudo apt-get install`, not `sudo apt-get remove`. On Windows, you need to figure out how to get the fftw library installed. [Here are some suggestions](http://www.fftw.org/install/windows.html). [Here's another guide](https://stackoverflow.com/questions/39675436/how-to-get-fftw-working-on-windows-for-dummies) for Visual Studio. – neilfws Oct 10 '18 at 03:31
  • @neilfws thanks for the advice. I'd never used VS before, just downloaded and follow the instructions one by one. Many thanks! – Grec001 Oct 10 '18 at 08:09

1 Answers1

0

Even though this question is already a bit old: By now (Feb 2020) there are precompiled packages available that work also under Windows:

Canny Edges - Package

and more general:

List of all available packages

I have tried installing them and (at least for me) it worked.

shghm
  • 239
  • 2
  • 8