Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Windows - cmake succeed but make failed

Hi everyone,

I know there are a lot of topic about openCV compilation but I cannot find a solution to my issue. Under windows 7 I have successfully download and compiled openCV source using cmake. To be sure of it I have executed opencv_test_core which seems to work. Now that I want to make my own project, I followed this tuto http://docs.opencv.org/3.1.0/db/df5/tutorial_linux_gcc_cmake.html#gsc.tab=0 I am using cmake GUI and configuration and generation seem to work, I have this result without warnings : Configuring done Generating done. When I try to lauch the make command I have this return :

$ make

Scanning dependencies of target DisplayImage [ 50%] Building CXX object CMakeFiles/DisplayImage.dir/DisplayImage.cpp.obj make[2]: * [CMakeFiles/DisplayImage.dir/build.make:64: CMakeFiles/DisplayImage.dir/DisplayImage.cpp.obj] Error 1 make[1]: [CMakeFiles/Makefile2:68: CMakeFiles/DisplayImage.dir/all] Error 2 make: ** [Makefile:84: all] Error 2

I don't know where to find more log about this error and I have no idea where the problem is... Does someone have an idea about it ?

Windows - cmake succeed but make failed

Hi everyone,

I know there are a lot of topic about openCV compilation but I cannot find a solution to my issue. Under windows 7 I have successfully download and compiled openCV source using cmake. To be sure of it I have executed opencv_test_core which seems to work. Now that I want to make my own project, I followed this tuto http://docs.opencv.org/3.1.0/db/df5/tutorial_linux_gcc_cmake.html#gsc.tab=0 I am using cmake GUI and configuration and generation seem to work, I have this result without warnings : Configuring done Generating done. When I try to lauch the make command I have this return :

$ make

Scanning dependencies of target DisplayImage [ 50%] Building CXX object CMakeFiles/DisplayImage.dir/DisplayImage.cpp.obj make[2]: * [CMakeFiles/DisplayImage.dir/build.make:64: CMakeFiles/DisplayImage.dir/DisplayImage.cpp.obj] Error 1 make[1]: [CMakeFiles/Makefile2:68: CMakeFiles/DisplayImage.dir/all] Error 2 make: ** [Makefile:84: all] Error 2

I don't know where to find more log about this error and I have no idea where the problem is... Does someone have an idea about it ?

EDIT: I compiled in debug mode for more output

CMakeFiles/DisplayImage.dir/objects.a(DisplayImage.cpp.obj): in « cv::String::String(char const) »: C:/dev/sdk/OpenCV/opencv/build/x64/cmake/install/include/opencv2/core/cvstd.hpp:625: undefined reference to « cv::String::allocate(unsigned long) » C:/dev/sdk/OpenCV/opencv/build/x64/cmake/install/include/opencv2/core/cvstd.hpp:625:(.text$_ZN2cv6StringC1EPKc[_ZN2cv6StringC1EPKc]+0x4a): relocation truncated to fit : R_X86_64_PC32 to the undefined symbol cv::String::allocate(unsigned long) collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/DisplayImage.dir/build.make:115: DisplayImage.exe] Error 1 make[1]: [CMakeFiles/Makefile2:68: CMakeFiles/DisplayImage.dir/all] Error 2 make: ** [Makefile:84: all] Error 2

According to what I read it seems to be a library link order issue.

Windows - cmake succeed but make failedfailed [closed]

Hi everyone,

I know there are a lot of topic about openCV compilation but I cannot find a solution to my issue. Under windows 7 I have successfully download and compiled openCV source using cmake. To be sure of it I have executed opencv_test_core which seems to work. Now that I want to make my own project, I followed this tuto http://docs.opencv.org/3.1.0/db/df5/tutorial_linux_gcc_cmake.html#gsc.tab=0 I am using cmake GUI and configuration and generation seem to work, I have this result without warnings : Configuring done Generating done. When I try to lauch the make command I have this return :

$ make

Scanning dependencies of target DisplayImage [ 50%] Building CXX object CMakeFiles/DisplayImage.dir/DisplayImage.cpp.obj make[2]: * [CMakeFiles/DisplayImage.dir/build.make:64: CMakeFiles/DisplayImage.dir/DisplayImage.cpp.obj] Error 1 make[1]: [CMakeFiles/Makefile2:68: CMakeFiles/DisplayImage.dir/all] Error 2 make: ** [Makefile:84: all] Error 2

I don't know where to find more log about this error and I have no idea where the problem is... Does someone have an idea about it ?

EDIT: I compiled in debug mode for more output

CMakeFiles/DisplayImage.dir/objects.a(DisplayImage.cpp.obj): in « cv::String::String(char const) »: C:/dev/sdk/OpenCV/opencv/build/x64/cmake/install/include/opencv2/core/cvstd.hpp:625: undefined reference to « cv::String::allocate(unsigned long) » C:/dev/sdk/OpenCV/opencv/build/x64/cmake/install/include/opencv2/core/cvstd.hpp:625:(.text$_ZN2cv6StringC1EPKc[_ZN2cv6StringC1EPKc]+0x4a): relocation truncated to fit : R_X86_64_PC32 to the undefined symbol cv::String::allocate(unsigned long) collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/DisplayImage.dir/build.make:115: DisplayImage.exe] Error 1 make[1]: [CMakeFiles/Makefile2:68: CMakeFiles/DisplayImage.dir/all] Error 2 make: ** [Makefile:84: all] Error 2

According to what I read it seems to be a library link order issue.

EDIT 2: Well, I tried to answer my own question but since I am new my answer just get erased... :( I solved the issue by using the same compiler version when compiling opencv from sources and my project. Plus I had to use mingw64 terminal instead of msys terminal. Don't know why since they have the same PATH var and use the same 'make'... Anyway lena is now showing on the screen which is quit a relief for me!

Windows - cmake succeed but make failed [closed]

Hi everyone,

I know there are a lot of topic about openCV compilation but I cannot find a solution to my issue. Under windows 7 I have successfully download and compiled openCV source using cmake. To be sure of it I have executed opencv_test_core which seems to work. Now that I want to make my own project, I followed this tuto http://docs.opencv.org/3.1.0/db/df5/tutorial_linux_gcc_cmake.html#gsc.tab=0 I am using cmake GUI and configuration and generation seem to work, I have this result without warnings : Configuring done Generating done. When I try to lauch the make command I have this return :

$ make

Scanning dependencies of target DisplayImage [ 50%] Building CXX object CMakeFiles/DisplayImage.dir/DisplayImage.cpp.obj make[2]: * [CMakeFiles/DisplayImage.dir/build.make:64: CMakeFiles/DisplayImage.dir/DisplayImage.cpp.obj] Error 1 make[1]: [CMakeFiles/Makefile2:68: CMakeFiles/DisplayImage.dir/all] Error 2 make: ** [Makefile:84: all] Error 2

I don't know where to find more log about this error and I have no idea where the problem is... Does someone have an idea about it ?

EDIT: I compiled in debug mode for more output

CMakeFiles/DisplayImage.dir/objects.a(DisplayImage.cpp.obj): in « cv::String::String(char const) »: C:/dev/sdk/OpenCV/opencv/build/x64/cmake/install/include/opencv2/core/cvstd.hpp:625: undefined reference to « cv::String::allocate(unsigned long) » C:/dev/sdk/OpenCV/opencv/build/x64/cmake/install/include/opencv2/core/cvstd.hpp:625:(.text$_ZN2cv6StringC1EPKc[_ZN2cv6StringC1EPKc]+0x4a): relocation truncated to fit : R_X86_64_PC32 to the undefined symbol cv::String::allocate(unsigned long) collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/DisplayImage.dir/build.make:115: DisplayImage.exe] Error 1 make[1]: [CMakeFiles/Makefile2:68: CMakeFiles/DisplayImage.dir/all] Error 2 make: ** [Makefile:84: all] Error 2

According to what I read it seems to be a library link order issue.

EDIT 2: Well, I tried to answer my own question but since I am new my answer just get erased... :( I solved the issue by using the same compiler version when compiling opencv from sources and my project. Plus I had to use mingw64 terminal instead of msys terminal. Don't know why since they have the same PATH var and use the same 'make'... Anyway lena is now showing on the screen which is quit a relief for me!