Skip to content

Latest commit

 

History

History
93 lines (56 loc) · 4.19 KB

how_to_compile.md

File metadata and controls

93 lines (56 loc) · 4.19 KB

Follow below steps to compile my OpenCV code in quick way..

First open Dev C++ and click on 'File' -> 'New' -> 'Project'. image

Now select 'Console Application' and 'C++ Project' and click on 'OK'. image

Make any new folder and just 'Save' it. image

Now you will see main.cpp file having preloaded code just add 'using namespace std;' and 'cout << "We have completed step 1\n;'. image

Now 'Compile and Run'. image

You will see output like this: image

Now copy my code and paste it to the main.cpp file. image

Now extract opencv2_4_10.exe or opencv2_4_13.exe to any folder and open 'build' folder. image

Now open 'include' folder and you will see two folders 'opencv' and 'opencv2', copy both the folders. image

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. image image

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

image image

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

image image

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

image

Now go to 'Project' -> 'Project Options...' and click on 'Parameters' and 'Add library or object' image image

Now navigate to the folder where main.cpp and library files are residing and select

opencv_core2413.lib

opencv_highgui2413.lib

opencv_imgproc2413.lib

image image

And now click on 'Compile' image

And at last you will see 'Compile Log' wihout any error and warning. image

That's it :)