Ask Your Question

sguinard's profile - activity

2015-08-06 04:55:25 -0600 commented question Problems linking opencv with qt when cross-compiling

For other people having the same problem as me, I cannot tell you I found a solution because my Linux VM broke, but I have a few ideas: if you have 2 versions of OpenCV in your computer, just run a make distclean and then do another make specifying the path to the correct library. Also, be aware that if your're using QT 5.x you may have to rebuild your library yourself because it seems that by default, OpenCV is meant to be used with QT 4.x Hope it will help someone...

2015-08-06 04:46:04 -0600 received badge  Supporter (source)
2015-08-04 04:49:43 -0600 asked a question Problems linking opencv with qt when cross-compiling

Hi everybody !

I wrote a c++ code with qt on Linux, and I am trying to cross-compile for Windows following this tutorial: [http://stackoverflow.com/questions/14...] but each time, at the sudo make step, I have a lot of the following errors:

release/mainwindow.o:mainwindow.cpp:(.text+0xb659): undefined reference to Magick::Image::~Image()' release/mainwindow.o:mainwindow.cpp:(.text+0xb66e): undefined reference toMagick::Image::~Image()' release/mainwindow.o:mainwindow.cpp:(.text+0xb683): undefined reference to Magick::Image::~Image()' release/mainwindow.o:mainwindow.cpp:(.text+0xba96): undefined reference tocv::Mat::deallocate()' release/mainwindow.o:mainwindow.cpp:(.text+0xbab0): undefined reference to cv::Mat::deallocate()' release/mainwindow.o:mainwindow.cpp:(.text+0xbaca): undefined reference tocv::Mat::deallocate()' release/mainwindow.o:mainwindow.cpp:(.text+0xbae4): undefined reference to cv::Mat::deallocate()' release/mainwindow.o:mainwindow.cpp:(.text+0xbafe): undefined reference tocv::Mat::deallocate()' release/mainwindow.o:mainwindow.cpp:(.text+0xbb18): more undefined references to cv::Mat::deallocate()' follow release/mainwindow.o:mainwindow.cpp:(.text+0xbf5a): undefined reference tocv::fastFree(void)' release/mainwindow.o:mainwindow.cpp:(.text+0xbfe7): undefined reference to cv::fastFree(void*)' release/mainwindow.o:mainwindow.cpp:(.text+0xc074): undefined reference tocv::fastFree(void)' release/mainwindow.o:mainwindow.cpp:(.text+0xc101): undefined reference to cv::fastFree(void*)' release/mainwindow.o:mainwindow.cpp:(.text+0xc18e): undefined reference tocv::fastFree(void)' release/mainwindow.o:mainwindow.cpp:(.text+0xc263): more undefined references to cv::fastFree(void*)' follow release/mainwindow.o:mainwindow.cpp:(.text+0xc9cc): undefined reference tocv::Mat::deallocate()' release/mainwindow.o:mainwindow.cpp:(.text+0xc9e6): undefined reference to cv::Mat::deallocate()' release/mainwindow.o:mainwindow.cpp:(.text+0xca5a): undefined reference tocv::Mat::deallocate()' release/mainwindow.o:mainwindow.cpp:(.text+0xca74): undefined reference to cv::Mat::deallocate()' release/mainwindow.o:mainwindow.cpp:(.text+0xca8e): undefined reference tocv::Mat::deallocate()' release/mainwindow.o:mainwindow.cpp:(.text+0xcaa8): more undefined references to cv::Mat::deallocate()' follow release/mainwindow.o:mainwindow.cpp:(.text$_ZN2cv3MatD1Ev[__ZN2cv3MatD1Ev]+0x6d): undefined reference tocv::fastFree(void)' release/mainwindow.o:mainwindow.cpp:(.text$_ZN2cv3Mat6createEiii[__ZN2cv3Mat6createEiii]+0x3d): undefined reference to cv::Mat::create(int, int const*, int)' release/mainwindow.o:mainwindow.cpp:(.text$_ZN2cv7MatExprD1Ev[__ZN2cv7MatExprD1Ev]+0xd3): undefined reference tocv::fastFree(void*)' release/mainwindow.o:mainwindow.cpp:(.text$_ZN2cv7MatExprD1Ev[__ZN2cv7MatExprD1Ev]+0x151): undefined reference to cv::fastFree(void*)' release/mainwindow.o:mainwindow.cpp:(.text$_ZN2cv7MatExprD1Ev[__ZN2cv7MatExprD1Ev]+0x177): undefined reference tocv::Mat::deallocate()' release/mainwindow.o:mainwindow.cpp:(.text$_ZN2cv7MatExprD1Ev[__ZN2cv7MatExprD1Ev]+0x1df): undefined reference to cv::fastFree(void*)' release/mainwindow.o:mainwindow.cpp:(.text$_ZN2cv7MatExprD1Ev[__ZN2cv7MatExprD1Ev]+0x204): undefined reference tocv::Mat::deallocate()' release/mainwindow.o:mainwindow.cpp:(.text$_ZN2cv7MatExprD1Ev[__ZN2cv7MatExprD1Ev]+0x220): undefined reference to `cv::Mat::deallocate()'

Here is the command provoking this errors:

stephane@ubuntu:~/Desktop/DSMPI$ sudo make make -f Makefile.Release make[1]: Entering directory /home/stephane/Desktop/DSMPI' mxe/usr/bin/i686-w64-mingw32.static-g++ -Wl,-s -Wl,-subsystem,windows -mthreads -o release/.exe release/main.o release/mainwindow.o release/_plugin_import.o release/moc_mainwindow.o -lmingw32 -L/home ... (more)