Settings: Files/Opencv Directory. Now, We Have To Configure Devcpp That He Can Take
Settings: Files/Opencv Directory. Now, We Have To Configure Devcpp That He Can Take
We will suppose that the OpenCV library is installed in the C:\Program Files\OpenCV directory. Now, we have to configure DevCpp that he can take into account, all the includes files (.h), all the static libraries in OpenCV (.lib), and all the dynamic library (.dll) useful for the execution and not for the compilation. This configuration has been tested with the version 4.9.9.x of DevCPP. First of all, you have to indicate the header files you want to add. To do that, select Tools->Compiler Options.
. Then click on the plus sign to add a new compiler (in fact, only some different options) named here, OpenCV.
To finish, on the section Add the following ... write : -L"C:\Program Files\OpenCV\lib" -lcxcore -lcv -lcvaux -lhighgui -lml -lcvcam. Or the following for OpenCV 2.1 -L"C:\OpenCV2.1\lib" -lcxcore210 -lcv210 lcvaux210 -lhighgui210 -lml210
FIles\OpenCV2.x\bin is sufficient.
And to finish, add the bin directory where the dlls are:
Test
Let us choice a C program on the samples directory of OpenCV and try to execute it by typing F9. As you can see, all is OK.