Intellisense - Dim Inactive Regions: Where does vscode-cpptools get the values for variables used in "#IF" e.g. "GTK_CHECK_VERSION"? #8523
Replies: 3 comments 2 replies
-
Look at the definition GTK_CHECK_VERSION -- I'm guessing you may need to add some "defines". |
Beta Was this translation helpful? Give feedback.
-
However, as far as I can see, IntelliSense not working when the option "Dim Inactive Regions" is disabled, might be considered a bug. |
Beta Was this translation helpful? Give feedback.
-
Hi @ToxicDragon . Can you explain what you mean by:
When I set Note the lack of a squiggle in the first block. IntelliSense is based on parsing/compiling the code. If IntelliSense sees a disabled block, it does not parse its contents. Can you provide a simple, self-contained example that demonstrates the issue? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I have the problem that vscode-cpptools "dim inactive regions" option dims the region in the statement
#if GTK_CHECK_VERSION(4,0,0)
and additionally Intellisense also does not work in that region.
When changing the statement to
#if GTK_CHECK_VERSION(3,0,0)
the respective region is not dimmed anymore and also IntelliSense works again.
However when running the application, the following code
cout << gtk_get_major_version() << "." << gtk_get_minor_version() << "." << gtk_get_micro_version() << endl;
returns
4.5.0
Therefore, I know for a fact that at compile time level my application uses GTK 4.5.0.
So where does the vscode-cpptools know the GTK version from and therefore is able to judge
GTK_CHECK_VERSION(4,0,0)
?I also looked into my project's
.vscode
folder into thec_cpp_properties.json
file and added the GTK4 library install dir"/usr/local/include/gtk-4.0"
as follows:But this did not have the desired effect; still the respective code block is dimmed and Intellisense does not work.
"So why not turn off the feature "Dim inactive regions"?", I thought. Well, this makes the code undimmed (yay) BUT IntelliSense STILL does not work (nay), which is a major problem for me.
Can you help me out or is it a bug that IntelliSense does not work EVEN if the "dim inactive regions" option is disabled?
Beta Was this translation helpful? Give feedback.
All reactions