Install OpenCV2.4.1 on windows 7 x64 - Mingw & codeblocks

Installing OpenCV2.4.1 on windows 7 x64 - Mingw and code blocks

Hi, I have completed this tutorial.

Getting started with OpenCV 2.4 and MinGW on Windows 7

I configured the same, except instead of x86, I installed x64.

This is an example

#include "opencv2/highgui/highgui.hpp" #include <iostream> using namespace cv; using namespace std; int main(int argc, char** argv) { Mat im = imread(argc == 2 ? argv[1] : "lena.jpg", 1); if (im.empty()) { cout << "Cannot open image!" << endl; return -1; } imshow("image", im); waitKey(0); return 0; } 

when i compile main.cpp

C: \ Users \ rgap \ Desktop> g ++ -I "C: \ opencv \ build \ include" -L "C: \ opencv \ build \ x64 \ mingw \ lib" main.cpp -lope ncv_core241 -lopencv_highgui241 -o main

I get the following error

 C:\Users\rgap\AppData\Local\Temp\ccDgmPAT.o:main.cpp:(.text+0x62): undefined reference to `cv::imread( std::string const&, int)' C:\Users\rgap\AppData\Local\Temp\ccDgmPAT.o:main.cpp:(.text+0xc7): undefined reference to `cv::_InputA rray::_InputArray(cv::Mat const&)' C:\Users\rgap\AppData\Local\Temp\ccDgmPAT.o:main.cpp:(.text+0xfe): undefined reference to `cv::imshow( std::string const&, cv::_InputArray const&)' C:\Users\rgap\AppData\Local\Temp\ccDgmPAT.o:main.cpp:(.text+0x120): undefined reference to `cv::waitKe y(int)' C:\Users\rgap\AppData\Local\Temp\ccDgmPAT.o:main.cpp:(.text$_ZN2cv3MatD1Ev[cv::Mat::~Mat()]+0x2b): und efined reference to `cv::fastFree(void*)' C:\Users\rgap\AppData\Local\Temp\ccDgmPAT.o:main.cpp:(.text$_ZN2cv3Mat7releaseEv[cv::Mat::release()]+0 x3c): undefined reference to `cv::Mat::deallocate()' collect2: ld devolviรณ el estado de salida 1 

This is mistake?: (

thanks:)

+1
c ++ opencv mingw codeblocks
source share

No one has answered this question yet.

See similar questions:

32
Getting started with OpenCV 2.4 and MinGW on Windows 7
8
How to compile a program using OpenCV 2.4.3 using Code :: Blocks?
one
OpenVC 2.4.5, eclipse CDT Juno, MinGW error 0xc0000005

or similar:

600
What is the difference between Cygwin and MinGW?
2
Compiling SSE Code Using OpenCV Libraries
one
A Few Problems Compiling and Running the C ++ Example on Windows
0
Compilation of programs in OpenCV
0
Error with opencv 2.1.40 with Eclipse C ++ CDT and MinGW
0
Verifying Boost Installation with MinGW
0
ld returned 1 exit status - Windows 8 x64
0
makefile to compile opencv with cuda on ubuntu stopped working
0
Compiling OpenCv with code :: Lock on Windows
0
Cross compiling openCV for ARM on ubuntu

All Articles