Trying to compile C++using Visual Studio Code or g++ in Ubuntu on Jetson Nano

I added -lopencv_imgcodecs -lopencv_core -lopencv_features2d -lopencv_highgui to the command line and it worked.
I needed Visual Studio Code to do this automatically so I added the following to tasks.json
“-lopencv_imgcodecs”,
“-lopencv_core”,
“-lopencv_features2d”,
“-lopencv_highgui”