Tag Archives: visual studio

visual studio Error D8016 ‘/ZI’ and ‘/Gy-‘ command-line options are incompatible

An error occurred while compiling the project with Visual Studio:

Error D8016 ‘/ZI’ and ‘/Gy-‘ command line options are incompatible TextCat E:\ Desktop \20161\ Machine learning \project\002-2266031 _2_MLKD-project2-TC \ TC\ TextCat\cl 1Solutions:
Right-click project — “properties –” C/C++ — “Debug Information Format –” Select: Program Database(/Zi)

OpenCV3.1 + Python2.7 error “DLL load failed: The specified module could not be found”

According to the web site [http://docs.opencv.org/3.1.0/d5/de5/tutorial_py_setup_in_windows.html] method 2 manual compiled OpenCV3.1.0 and install python.
but error “DLL load failed: The specified module could not be found” appears when importing cv2.
I looked for the following reasons online, the possible reason is that
1) opencv and python corresponding versions are different, such as one is 32bit and one is 64bit. Pyd
2) did not add cv2.pyd to C:/Python27/lib/site-packages
3) system environment variable could not be found cv2.pyd
the final solution to my computer problem was:
add [C:\ opencv-3.1.0 \build\bin\Release] to system environment variable.

Configuration of libjpeg turbo in vs2019

tool: libjpeg-turbo can be quickly decoded, Azure Kinect Sensor SDK is used in this tool

https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/release/1.3.x/src/record/internal/matroska_read.cpp

libjpeg-turbo Github
https://github.com/libjpeg-turbo/libjpeg-turbo

can be compiled from github source code with cmake. To install nmake, check to see if there is a release

libjpeg-turbo released on sourceforge compiled 2.0.3 version:

libjpeg – turbo 2.0.3

https://sourceforge.net/projects/libjpeg-turbo/files/2.0.3/

Exe libjpeg-turbo-2.0.3-vc64. Exe
install (unzip) :
libjpeg-turbo64 folder:

├─bin
├─classes
├─doc
├─include
├─lib
│  └─pkgconfig
└─man
    └─man1

structure similar to OpenCV library
, I downloaded libjpeg-turbo-2.0.3-gcc64. Exe . A file under lib, in order to cooperate with vs, I still use libjpeg-turbo-2.0.3-vc64

is then configured as follows.

configuration

  1. VC++ Directories/Include Directories new: $(LIBJEPEGTURBO_PATH)\ Include

    1. create a new system variable: LIBJEPEGTURBO_PATH : D:\libjpeg-turbo-gcc64 create a new environment variable: %LIBJPEGTURBO_PATH%\bin corresponding to dynamic library location
    2. >
    3. >>
  2. Linker/General/Addtional Lib Dir $(LIBJEPEGTURBO_PATH)\lib corresponding static Library location
    VC++ Directories/Library Directories new $(LIBJPEGTURBO_PATH)\lib

  3. Linker/Input/Addtional Dependencies new turbojpeg. Lib

    refer to the introduction method of Azure- kinect-sdk for libjpeg. When linking, introduce lib

target_link_libraries(k4a_playback PUBLIC 
    k4a::k4a
    k4ainternal::logging
    ebml::ebml
    matroska::matroska
    libyuv::libyuv
    libjpeg-turbo::libjpeg-turbo
)

program #include "turbojpeg. H "