Configuration of the C + + library file in Vscode

Source: Internet
Author: User

Configuration of the C + + library file in Vscode

Before has been used sublime do the main editor, and now mainly use Vscode, after all, factory production, from the current use of the situation, I prefer to use the Vscode editor.

Sometimes the vscode is used to component C + + engineering, and some externally dependent library files, such as OpenCV, are used. At this point, you want the VSCODE code hint function to prompt the function in OpenCV, this time you need to configure the C + + compilation environment in the workspace.

If you have used sublime or vscode, you know ctrl+shift+p can bring up the control window, then first press ctrl+shift+p:

Then enter Edit or configuration and select "C/cpp:edit Configurations":

The./.vscode/c_cpp_properties.json file is then generated in your workspace, and all we need to do is configure the parameters for this file;

Add the address of your library file to the "Includepath" attribute, similar to this:

                "/home/**/Tools/opencv/cpu-install/include",                "/home/**/Tools/opencv/gpu-install/include"

See:

After the configuration, it is better to restart the client, Vscode will also give you automatically prompt OpenCV library functions or classes and so on.

Configuration of the C + + library file in Vscode

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.