Skip to content

"pencilSketch not declared in scope" error on install #14

@McClellandLegge

Description

@McClellandLegge

When installing a compilation error appears, which I can replicate when trying to compile directly:

$  /opt/rh/devtoolset-7/root/usr/bin/g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I/usr/include/opencv   -D_DATA_PREFIX=/usr -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c effects.cpp -o effects.o
effects.cpp: In function ‘XPtrMat cvmat_sketch(XPtrMat, bool)’:
effects.cpp:16:3: error: ‘pencilSketch’ was not declared in this scope
   pencilSketch(get_mat(ptr),out1, out2, 10 , 0.1f, 0.03f);
   ^~~~~~~~~~~~
effects.cpp: In function ‘XPtrMat cvmat_stylize(XPtrMat)’:
effects.cpp:23:3: error: ‘stylization’ was not declared in this scope
   stylization(get_mat(ptr), out);
   ^~~~~~~~~~~

Is there a specific version of opencv I should be using?

opencv version:

$  sudo yum list installed \| grep opencv
opencv.x86_64                      2.4.5-3.el7                         @base
opencv-core.x86_64                 2.4.5-3.el7                         @base
opencv-devel.x86_64                2.4.5-3.el7                         @base
opencv-python.x86_64               2.4.5-3.el7                         @base

R version:

$  sudo yum list installed | grep ^R
R.x86_64                           3.6.0-1.el7                         @epel
R-Rcpp.x86_64                      1.0.2-1.el7                         @epel
R-Rcpp-devel.x86_64                1.0.2-1.el7                         @epel
R-core.x86_64                      3.6.0-1.el7                         @epel
R-core-devel.x86_64                3.6.0-1.el7                         @epel
R-devel.x86_64                     3.6.0-1.el7                         @epel
R-java.x86_64                      3.6.0-1.el7                         @epel
R-java-devel.x86_64                3.6.0-1.el7                         @epel

g++ version:

$  /opt/rh/devtoolset-7/root/usr/bin/g++ --version
g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions