Follow below steps to compile my OpenCV code in quick way..
First open Dev C++ and click on 'File' -> 'New' -> 'Project'.
Now select 'Console Application' and 'C++ Project' and click on 'OK'.
Make any new folder and just 'Save' it.
Now you will see main.cpp file having preloaded code just add 'using namespace std;' and 'cout << "We have completed step 1\n;'.
You will see output like this:
Now copy my code and paste it to the main.cpp file.
Now extract opencv2_4_10.exe or opencv2_4_13.exe to any folder and open 'build' folder.
Now open 'include' folder and you will see two folders 'opencv' and 'opencv2', copy both the folders.
Paste it inside folder 'Dev-Cpp\MinGW64\include' and 'Dev-Cpp\MinGW64\x86_64-w64-mingw32\include'. This will include all required header files of opencv to the project whenever required.
Now copy three library files from folder 'opencv_2_4_13\build\x64\vc14\lib' to the folder where main.cpp file resides, these are required to run code
opencv_core2413.lib
opencv_highgui2413.lib
opencv_imgproc2413.lib
Now copy three dll files of above three libraries from folder 'opencv_2_4_13\build\x64\vc14\bin' to the folder where main.cpp file resides, these are required to run code
opencv_core2413.dll
opencv_highgui2413.dll
opencv_imgproc2413.dll
Now we will be having 6 files in our folder
opencv_core2413.lib
opencv_highgui2413.lib
opencv_imgproc2413.lib
opencv_core2413.dll
opencv_highgui2413.dll
opencv_imgproc2413.dll
Now go to 'Project' -> 'Project Options...' and click on 'Parameters' and 'Add library or object'
Now navigate to the folder where main.cpp and library files are residing and select
opencv_core2413.lib
opencv_highgui2413.lib
opencv_imgproc2413.lib
And at last you will see 'Compile Log' wihout any error and warning.
That's it :)