Skip to content

Compile error with OpenCV3.43 and TDM-GCC-64 #13113

Closed
@wukongtea

Description

@wukongtea
  • TDM-GCC-64 =>5.1.0-2
    -Compiler => cmake-3.13.0-rc3-win64-x64
  • Operating System / Platform => Windows10 64 Bit
  • OpenCV => 3.4.3
    error log:
    [ 60%] Linking CXX shared library ....\bin\libopencv_videoio343.dll
    Copying D:/software/Opencv/build/x64/TDM/3rdparty/ffmpeg/opencv_ffmpeg_64.dll to the output directory
    [ 61%] Built target opencv_videoio
    [ 61%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_w32.cpp.obj
    [ 61%] Linking CXX shared library ....\bin\libopencv_superres343.dll
    D:\software\Opencv\sources\modules\highgui\src\window_w32.cpp: In function 'void icvLoadWindowPos(const char*, CvRect&)':
    D:\software\Opencv\sources\modules\highgui\src\window_w32.cpp:310:48: error: 'strcpy_s' was not declared in this scope
    strcpy_s( szKey, 1024, icvWindowPosRootKey );
    ^
    D:\software\Opencv\sources\modules\highgui\src\window_w32.cpp:311:33: error: 'strcat_s' was not declared in this scope
    strcat_s( szKey, 1024, name );
    ^
    D:\software\Opencv\sources\modules\highgui\src\window_w32.cpp: In function 'void icvSaveWindowPos(const char*, CvRect)':
    D:\software\Opencv\sources\modules\highgui\src\window_w32.cpp:371:48: error: 'strcpy_s' was not declared in this scope
    strcpy_s( szKey, 1024, icvWindowPosRootKey );
    ^
    D:\software\Opencv\sources\modules\highgui\src\window_w32.cpp:372:33: error: 'strcat_s' was not declared in this scope
    strcat_s( szKey, 1024, name );
    ^
    D:\software\Opencv\sources\modules\highgui\src\window_w32.cpp: In function 'LRESULT HighGUIProc(HWND, UINT, WPARAM, LPARAM)':
    D:\software\Opencv\sources\modules\highgui\src\window_w32.cpp:1597:24: warning: left operand of comma operator has no effect [-Wunused-value]
    } while (0,0); // (0,0) instead of (0) to avoid MSVC compiler warning C4127: "conditional expression is constant"
    ^
    modules\highgui\CMakeFiles\opencv_highgui.dir\build.make:90: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_w32.cpp.obj' failed
    mingw32-make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_w32.cpp.obj] Error 1
    CMakeFiles\Makefile2:3204: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/all' failed
    mingw32-make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
    mingw32-make[1]: *** Waiting for unfinished jobs....
    [ 62%] Built target opencv_superres
    Makefile:161: recipe for target 'all' failed
    mingw32-make: *** [all] Error 2

how can i deal with this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions