Monday, 26 August 2013

Migrate from 32bi to 64bit - OpenCV/MinGW/Eclipse

Migrate from 32bi to 64bit - OpenCV/MinGW/Eclipse

I'm working with opencv for couple of months under windows 32bit,with
eclipse and mingw. After many hours, my program go through build, link
without errors, but when start it crashes... my favorite "dont send"
window.....
Source:
#include <opencv.hpp>
#include <windows.h>
#include <iostream>
using namespace std;
using namespace cv;
int main() {
Mat img(Mat::zeros(100, 100, CV_8U));
//imshow("window", img);
cout << "hello world!" << endl;
system("PAUSE");
return 0;
}
While imshow is comented, there is no problem, but when try to use imshow
or waitKey, it compiles, but crashes ...
Build commands:
g++ "-IW:\\Software\\opencv\\build\\include"
"-IW:\\Software\\opencv\\build\\include\\opencv"
"-IW:\\Software\\opencv\\build\\include\\opencv2" -O3 -g3 -Wall -Wextra
-c -fmessage-length=0 -o "src\\HelloWorld.o" "..\\src\\HelloWorld.cpp"
g++ "-LW:\\Software\\opencv\\build\\x64\\mingw\\lib" -o HelloWorld.exe
"src\\HelloWorld.o" -lopencv_calib3d246 -lopencv_contrib246
-lopencv_core246 -lopencv_features2d246 -lopencv_flann246
-lopencv_gpu246 -lopencv_highgui246 -lopencv_imgproc246
-lopencv_legacy246 -lopencv_ml246 -lopencv_nonfree246
-lopencv_objdetect246 -lopencv_photo246 -lopencv_stitching246
-lopencv_superres246 -lopencv_video246 -lopencv_videostab246
The system is: Win7 64bit, Eclipse CDT Kepler, Mingw. Before trat I was
working on XP 32bit. Is there a possibility that the problem comes from
the operating system ?

No comments:

Post a Comment