Skip to content

Commit 5dc09f8

Browse files
Merge pull request #1399 from jasonrandrews/review
Test OpenCV on Windows Learning Path
2 parents 7f15c41 + 5b586ad commit 5dc09f8

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

content/learning-paths/laptops-and-desktops/win-opencv/1-opencv-compilers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ The instructions were tested with the version 18.1.8.
7575
The instructions were tested with version 1.11.1
7676
{{% /notice %}}
7777

78-
You use the LLVM Clang and the Ninja generator to build. Set PATH to the paths to your LLVM and Ninja install.
78+
Make sure LLVM Clang and Ninja are in your search path. If they are not, you can use Windows Control Panel to set the PATH environment variable.
7979

8080
You now have the required development tools installed. Please proceed to the page for the compiler you want to build with.

content/learning-paths/laptops-and-desktops/win-opencv/2-1-build-msvc.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ layout: learningpathall
88

99
## How do I build OpenCV with MSVC?
1010

11+
Follow the steps below to build OpenCV and a test application using the library with the MSVC compiler.
12+
1113
### Clone the OpenCV repository
1214

1315
Open up a Windows PowerShell and checkout the source tree:
@@ -113,7 +115,7 @@ The build takes approximately 25 mins on a Lenovo X13s
113115

114116
When the build and the install steps are complete, confirm the shared library has been created by inspecting the results in the `install/bin` directory:
115117

116-
```bash { output_lines = "2-11" }
118+
```bash { output_lines = "2-12" }
117119
ls ./install/x64/vc17/bin
118120
Directory: C:\Users\username\work\opencv\build_msvc\install\x64\vc17\bin
119121
Mode LastWriteTime Length Name

content/learning-paths/laptops-and-desktops/win-opencv/2-2-build-clang.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ layout: learningpathall
88

99
## How do I build OpenCV with Clang?
1010

11+
Follow the steps below to build OpenCV and a test application using the library with the Clang compiler.
12+
1113
### Clone the OpenCV repository
1214

1315
Open up a Windows Powershell and checkout the source tree:
@@ -198,11 +200,7 @@ The given options specify the following:
198200

199201
### Run the program
200202

201-
To run the executable, you need to ensure that the directory containing the dynamic libraries (DLLs) is added to the `PATH` environment variable, or place the DLLs in the same location as the executable.
202-
203-
```bash
204-
.\test_opencv.exe
205-
```
203+
To run the executable, you need to ensure that the directory containing the dynamic libraries (DLLs) is added to the `PATH` environment variable, or place the DLLs in the same location as the executable.
206204

207205
{{% notice Note %}}
208206
The command below adds the DLL directory to the beginning of the `PATH` environment variable. Since this is a temporary setting, the `PATH` will revert to its original state when the PowerShell session is closed. To set it permanently, you need to use the Windows system settings or the `[Environment]::SetEnvironmentVariable()` method.
@@ -212,7 +210,13 @@ $env:PATH = "./install/bin;" + $env:PATH
212210
```
213211
{{% /notice %}}
214212

215-
When you execute the command, it will finish quickly, and `test_image.png` is generated.
213+
Run the test program:
214+
215+
```bash
216+
.\test_opencv.exe
217+
```
218+
219+
When you execute the command, it will finish quickly, and `test_image.png` is generated. If you don't have the DLL directory in your search path, the program appears to run, but no `test_image.png` is generated.
216220

217221
Open the image file, it should look like the example shown below.
218222

0 commit comments

Comments
 (0)