Author Topic: headers suggestions  (Read 3694 times)

Offline nick name

  • Single posting newcomer
  • *
  • Posts: 4
headers suggestions
« on: September 08, 2017, 11:10:29 am »
I decieded to update my old version of codeblocks (11.12) to the last one I could find, 16.01. I noted that when I type "#include <", the standard headers are'nt displayed. The only suggesions are in the header's search directories I added to the project. I searched in the Editor's parameters and did not find any solutions. Is it possible to display them without adding a search directory of the main header's directory for each projects ?
« Last Edit: September 08, 2017, 11:14:14 am by nick name »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: headers suggestions
« Reply #1 on: September 08, 2017, 01:48:42 pm »
Have you started to type more characters? The completion should kick in after 3 letters.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: headers suggestions
« Reply #2 on: September 08, 2017, 09:05:50 pm »
State your OS and compiler versions, please.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline nick name

  • Single posting newcomer
  • *
  • Posts: 4
Re: headers suggestions
« Reply #3 on: September 09, 2017, 03:34:12 pm »
Have you started to type more characters? The completion should kick in after 3 letters.
Of course, and even with the ctrl+space, it just suggest the headers in the added directories.
I have Code::Blocks 16.01, and MinGW with gcc 6.3.0, and my os is windows 10 wow64
« Last Edit: September 09, 2017, 04:00:26 pm by nick name »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: headers suggestions
« Reply #4 on: September 09, 2017, 04:45:34 pm »
@ollydbg: Is there a way to see the folders that the CC plugin detects by calling GCC? On linux this is possible by using the -v --debug-log flags when starting C::B in terminal. But I don't have an idea if this works similarly on windows.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: headers suggestions
« Reply #5 on: September 09, 2017, 05:02:27 pm »
@ollydbg: Is there a way to see the folders that the CC plugin detects by calling GCC? On linux this is possible by using the -v --debug-log flags when starting C::B in terminal. But I don't have an idea if this works similarly on windows.
yes, the same thing under Windows, the log messages are shown in "debug log" panel.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: headers suggestions
« Reply #6 on: September 09, 2017, 05:14:22 pm »
@nick name:
Can you start codeblocks from a cmd.exe window and can you pass these two arguments "-v --debug-log" (without the quotes)?
Then try to reproduce the problem and paste the contents of the "Debug log" window here using code or quote tags.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline nick name

  • Single posting newcomer
  • *
  • Posts: 4
Re: headers suggestions
« Reply #7 on: September 09, 2017, 05:41:47 pm »
I started CB with arguments -v --debug-log, and it worked! the output when loading headers is

"ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
SystemHeadersThread: C:\MinGW\lib\gcc\mingw32\6.3.0\include\c++\ , 656
SystemHeadersThread: C:\MinGW\lib\gcc\mingw32\6.3.0\include\c++\mingw32\ , 23
SystemHeadersThread: C:\MinGW\lib\gcc\mingw32\6.3.0\include\c++\backward\ , 8
SystemHeadersThread: C:\MinGW\lib\gcc\mingw32\6.3.0\include\ , 90
SystemHeadersThread: C:\MinGW\include\ , 2346
SystemHeadersThread: C:\MinGW\lib\gcc\mingw32\6.3.0\include-fixed\ , 3
SystemHeadersThread: C:\MinGW\mingw32\include\ , 5
SystemHeadersThread: Total number of paths: 7"
and it resolved my problem because when I rebooted my CB, the suggestions were rights. Thank you for help!
« Last Edit: September 09, 2017, 05:43:58 pm by nick name »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: headers suggestions
« Reply #8 on: September 09, 2017, 06:01:44 pm »
This is strange. Anyway good to know that the problem is no resolved.

Can you tell me if it works when you start codeblock without passing these two parameters?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline nick name

  • Single posting newcomer
  • *
  • Posts: 4
Re: headers suggestions
« Reply #9 on: September 10, 2017, 07:59:54 pm »
Since I started cb in debug mode, suggestions are alwayse rights. I don't know if the problem was resolved thanks to the debug mdoe or by itself, but it works  ;D