User forums > Using Code::Blocks
Code Completion and Hints aren't working
fmc0501:
If I work on a GUI with wxWidgets, code completion and hints are good to go. But when I work on a console program, code completion and hints are MIA.
I've been using 17.12 and this was an issue. Earlier i downloaded the latest nightly build and that stuff's still gone when I work on a console program. Is there a setting somewhere to get these two things working in the console?
==============================
OS: Win X Pro
gcc version 8.1.0 (i686-posix-dwarf-rev0)
stahta01:
Is that a wxWidgets console program?
If yes, what wxWidgets version?
Note: I would only try to duplicate the issue and look for a possible cause; I am not likely to be able to fix anything more than a very minor problem.
Tim S.
fmc0501:
No. It isn't a wxWidgets console program. It's a standard C++ console application setup by Code::Blocks. Its only include is <iostream>.
I wouldn't have thought anything about it, the lack of cc and hints, but I know I get them in a wxWidgets app. So I thought it was strange. And I'm watching a video on C++ and the guy's working with the console (he's using C::B 16.01) and his code completion and hints work fine. So that led me to believe that I have something improperly configured.
UPDATE: I now have partial code completion. I get suggestions for keyword completion, but I still don't have...not sure what you would call it. But it goes like this.
--- Code: ---#include <iostream>
int main()
{
std::string phrase = "Steak is good!";
std:cout << phrase.
return 0;
}
--- End code ---
When I type phrase. I don't get options like find(), length(), or substr(). I can't even force selections to come up for me when I use Ctrl + Spacebar. When I add them though, the code runs fine. I'm pretty sure I have something set incorrectly...I just don't know what that would be.
stahta01:
It works for me. Edit2: Used C::B version 17.12 with MSys2 mingw64 gcc compiler.
Please check this setting
Settings -> Editor
left panel: CodeCompletion
Tab: C/C++ parser (Adv.)
checkbox needs to be checked: Include files w/o extensions
Edit: I had to close and reopen C::B after enabling the CC plugin (I normally do not use CC) to get it to work.
Tim S.
fmc0501:
I checked and it looked right. See, if I type #inc a box comes up with selections, include being one of them. But when I try to add <cmath> to an #include, I get nothing, not even when I force it with Ctrl + SB. I guess I'll just have to live with it, but I wish I didn't have to. The Code::Blocks IDE is too nice to not be able to have this functionality.
Navigation
[0] Message Index
[#] Next page
Go to full version