Last active
April 8, 2023 14:17
-
-
Save pqviet07/a368a82c35fb2312e51f7f04c5664886 to your computer and use it in GitHub Desktop.
Compile cpp file with boost and opencv library for vscode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"type": "shell", | |
"label": "C/C++: g++.exe build active file with boost and opencv lib", | |
"command": "C:\\Program Files\\mingw-w64\\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\\mingw64\\bin\\g++", | |
"args": [ | |
"-g", | |
"${file}", | |
"-o", | |
"${fileBasenameNoExtension}.exe", | |
"-I", | |
"C:\\Boost\\include\\boost_1_76_0", | |
"-L", | |
"C:\\Boost\\include\\boost_1_76_0\\stage\\lib", | |
"-I", | |
"C:\\OpenCV-MinGW-Build\\include", | |
"-L", | |
"C:\\OpenCV-MinGW-Build\\x64\\mingw\\bin", | |
"-llibopencv_calib3d452", | |
"-llibopencv_highgui452", | |
"-llibopencv_stitching452", | |
"-llibopencv_core452", | |
"-llibopencv_imgcodecs452", | |
"-llibopencv_video452", | |
"-llibopencv_dnn452", | |
"-llibopencv_imgproc452", | |
"-llibopencv_videoio452", | |
"-llibopencv_features2d452", | |
"-llibopencv_ml452", | |
"-lopencv_videoio_ffmpeg452_64", | |
"-llibopencv_flann452", | |
"-llibopencv_objdetect452", | |
"-llibopencv_gapi452", | |
"-llibopencv_photo452", | |
], | |
"options": { | |
"cwd": "${workspaceFolder}" | |
}, | |
"problemMatcher": [ | |
"$gcc" | |
], | |
"group": { | |
"kind": "build", | |
"isDefault": true | |
} | |
}, | |
{ | |
"type": "shell", | |
"label": "C/C++: g++.exe run & build active file", | |
"command": ".\\${fileBasenameNoExtension}.exe", | |
"options": { | |
"cwd": "${workspaceFolder}" | |
}, | |
"problemMatcher": [ | |
"$gcc" | |
], | |
"group": { | |
"kind": "build", | |
"isDefault": true | |
}, | |
"dependsOn": [ | |
"C/C++: g++.exe build active file with boost and opencv lib" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment