Skip to content

Commit ec1d9dc

Browse files
authored
Merge pull request spmallick#264 from saumyakswain/master
Resolved [-fpermissive] error while issuing make
2 parents 03eaa9e + 34bf386 commit ec1d9dc

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

QRCode-OpenCV/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ cmake_minimum_required(VERSION 2.8.12)
22

33
PROJECT(opencv_tests)
44

5-
set(OpenCV_DIR <specify your path to the opencv installation directory>installations/OpenCV4/lib/cmake/opencv4/)
5+
if(NOT OpenCV_DIR)
6+
set(OpenCV_DIR <specify your path to the opencv installation directory>installations/OpenCV4/lib/cmake/opencv4/)
7+
endif()
68
find_package( OpenCV REQUIRED )
79

810
set(CMAKE_CXX_STANDARD 11)

QRCode-OpenCV/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ This directory contains code for using OpenCV QR code. This code requires **Open
66
# For C++
77

88
## How to compile the code
9-
First Specify the **OpenCV_DIR** in CMakeLists.txt file. Then,
9+
10+
Specify the **OpenCV_DIR** in CMake option
11+
12+
```
13+
cmake -D OpenCV_DIR=<path to opencv install directory>/lib/cmake/opencv4/ .
14+
make
15+
```
16+
17+
OR First Specify the **OpenCV_DIR** in CMakeLists.txt file. Then,
1018

1119
```
1220
cmake .

QRCode-OpenCV/qrCodeOpencv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int main(int argc, char* argv[])
2727
else
2828
inputImage = imread("qrcode-learnopencv.jpg");
2929

30-
QRCodeDetector qrDecoder = QRCodeDetector::QRCodeDetector();
30+
QRCodeDetector qrDecoder;
3131

3232
Mat bbox, rectifiedImage;
3333

0 commit comments

Comments
 (0)