-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCODE reports symbols not found, while jump to declaration works correctly. #3790
Comments
@MaJerle C/C++: Log Diagnostics should appear when you have a C/C++ file active. |
I agree, thanks. it is below. Some notes:
There is clearly a disrepancy. I tested same project with
|
Update: for test, I moved from the And it works fine. Is it therefore vscode-cmake-tools issue? |
@MaJerle I think so. From your logging, I don't see a configuration being sent from CMake Tools. |
Edit: No, after I closed the window and opened again, it stopped working again, regardless of how cmake is configured. |
@MaJerle Sorry, I thought our Log Diagnostics logging showed the "Custom configurations received:" logging but it's actually in our main C/C++ logging when C_Cpp.loggingLevel is set to "Debug". Do you see the correct "Custom configurations received:" info being sent from CMake Tools? i.e. the correct includes/defines/args/compilerFragments. |
I'm not getting correct data if I well understood your point. I'm testing on 2 PCs, same project, and something seems to be wrong with CMake Tools extension, because suddenly it starts working (random) and as soon as I restart vscode, errors appear again |
@MaJerle We apologize for getting back to you so late. We are trying to reproduce your issue but we can't reproduce it based on the information you provided, could you provide your reproduction project? Please feel free if you have any doubt! |
Environment
Version: 1.89.1 (user setup)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:13:33.891Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22621
C/C++ version: v1.20.5
CMake Tools version: v1.17.17
Bug Summary and Steps to Reproduce
adc.c
file is part of the compilation. I can see it in thecompile_commands.json
cmake outputC/C++: Log Diagnostics
command, but there isCMake: Log Diagnostics
command, exported below#include "adc.h"
does not work, but CTRL+CLICK on theADC_HandleTypeDef
does open the declaration. You can see them on the picture below, lines1
and6
adc.c
is added to the project through the subdirectory, through the interface libraryCMake diagnostics
Configuration and Logs
Other Extensions
No response
Additional context
adc.c
andi2c.c
seem to have empty response by CMake Tools extension. They are added to the project as an external library to the main application, like so:And then
CMakeLists.txt
in theapp
folder looks like so:The text was updated successfully, but these errors were encountered: