In the open source software VSCODE, extension plug-ins are generally installed to improve work efficiency. Especially C/C, generally these are necessary:
1, C/C
2, C Intellisense
Among them: C Intellisense
The plug-in requires the support of GNU Global
, which is a program similar to CTag that can create Tags required to implement indexing and auto-completion functions. Therefore, the function of finding references cannot be realized before GUN GLOBAL is installed.
Solution:
1. Download the Windows version of GNU Global. After downloading and decompressing, configure the Win system PATH to the /bin directory of the GNU Global directory. This directory contains gtag.exe and other binary files.
Or download the Win32 program from the GTAGS official website, unzip it, place it in a suitable location, add the /bin folder under its directory to the system path, and restart the computer.
2. Open the project with vscode, ctrl shift c to open CMD, enter gtags, and three gtag files will be generated in the project.
3. Key points: The project path cannot contain Chinese characters; it cannot contain spaces; when entering gtags, it must be based on the project file name.
The reference reference is now in effect.
Recommended related articles and tutorials: vscode tutorial
The above is the detailed content of vscode cannot find reference. For more information, please follow other related articles on the PHP Chinese website!