Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV 3.4.3 compiling with MinGW-64 8.1.0 using CMake...New Issue

Another issue if anyone knows how to remove the -z flag from where ever the cmake file is located or the proper flag that needs to be put in its place, please reply...

And here's the error...

 [ 47%] Linking CXX shared library ..\..\bin\libopencv_world343.dll
cd /d S:\SYSTEMS\CPP\OpenCV\mingw-64-build\modules\world && S:\TOOLCHAINS\OTHER\Cmake-3.12.2-win64-x64\bin\cmake.exe -E cmake_link_script CMakeFiles\opencv_world.dir\link.txt --verbose=1
S:\TOOLCHAINS\OTHER\Cmake-3.12.2-win64-x64\bin\cmake.exe -E remove -f CMakeFiles\opencv_world.dir/objects.a
S:\TOOLCHAINS\CPP\MinGW-64\bin\ar.exe cr CMakeFiles\opencv_world.dir/objects.a @CMakeFiles\opencv_world.dir\objects1.rsp
S:\TOOLCHAINS\CPP\MinGW-64\bin\g++.exe     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wcast-align -Wstrict-aliasing=2 -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -fstack-protector-strong -fPIC -DSTRSAFE_NO_DEPRECATE -O2 -DNDEBUG  -DNDEBUG -g1 -D_FORTIFY_SOURCE=2    -z noexecstack -z relro -z now   -shared -o ..\..\bin\libopencv_world343.dll -Wl,--out-implib,..\..\lib\libopencv_world343.dll.a -Wl,--major-image-version,3,--minor-image-version,4 -Wl,--whole-archive CMakeFiles\opencv_world.dir/objects.a -Wl,--no-whole-archive @CMakeFiles\opencv_world.dir\linklibs.rsp
S:/TOOLCHAINS/CPP/MinGW-64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: unrecognized option '-z'
S:/TOOLCHAINS/CPP/MinGW-64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: use the --help option for usage information
collect2.exe: error: ld returned 1 exit status
mingw32-make[3]: *** [modules\world\CMakeFiles\opencv_world.dir\build.make:6512: bin/libopencv_world343.dll] Error 1
mingw32-make[3]: Leaving directory 'S:/SYSTEMS/CPP/OpenCV/mingw-64-build'
mingw32-make[2]: *** [CMakeFiles\Makefile2:2794: modules/world/CMakeFiles/opencv_world.dir/all] Error 2
mingw32-make[2]: Leaving directory 'S:/SYSTEMS/CPP/OpenCV/mingw-64-build'
mingw32-make[1]: *** [Makefile:165: all] Error 2
mingw32-make[1]: Leaving directory 'S:/SYSTEMS/CPP/OpenCV/mingw-64-build'

Thanks again, -PF