Author Topic: include autocomplete problem  (Read 11572 times)

Offline josh123

  • Single posting newcomer
  • *
  • Posts: 4
include autocomplete problem
« on: November 19, 2011, 04:25:21 pm »
I just started using Codeblocks and at first everything was working great. When I typed in include it would show suggestions for my /usr/include folder, but a little later I decided to add existing files to my project, and it made a header directory for the headers I wrote. Now when I try to include a file, it only gives me suggestions for the newly created header directory Codeblocks made. I checked the project properties and various other settings, and I added /usr/include in multiple areas, but still no success. Everything compiles and works; it finds the files I include, but it just does not autocomplete. I have been at this for about a week now, and it seems like there should be a simple solution can somebody please help. Thanks.
I am using Linux.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: include autocomplete problem
« Reply #1 on: November 20, 2011, 08:54:50 pm »
Is Settings->Editor...->Code completion "Enable headers code-completion" checked?

Offline josh123

  • Single posting newcomer
  • *
  • Posts: 4
Re: include autocomplete problem
« Reply #2 on: November 25, 2011, 04:41:21 am »
I checked and I don't see a checkbox with "Enable headers code-completion". I am running CodeBlocks 10.05 on Debian Linux, i guess maybe the GUI is different. It still does code completion, but only for the header folder created for individual projects. Its kinda strange. Thanks for the quick reply though.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: include autocomplete problem
« Reply #3 on: November 25, 2011, 05:37:59 am »
I checked and I don't see a checkbox with "Enable headers code-completion". I am running CodeBlocks 10.05 on Debian Linux
10.05 version is too old, it does not have such feature.
I suggest you use a more recent nightly build version of c::b.
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 josh123

  • Single posting newcomer
  • *
  • Posts: 4
Re: include autocomplete problem
« Reply #4 on: November 25, 2011, 06:48:16 pm »
I went to Jens repository and 10.05 seems to be the newest version. Do I have to download the source rather than a binary to get the latest version? When I installed code blocks I downloaded a tar.bz2 containing many .debs. I'm not sure .debs included the source but i change some file to get it to work.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: include autocomplete problem
« Reply #5 on: November 25, 2011, 07:01:50 pm »
No, Jens' repo has both trunk nightlies and debugger's branch nightlies.

Read carefully here http://apt.jenslody.de/ what should be done to get the nightlies. Hint don't use the release repos (or whatever they are called in debian/ubuntu)
(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 josh123

  • Single posting newcomer
  • *
  • Posts: 4
Re: include autocomplete problem
« Reply #6 on: November 26, 2011, 05:58:12 am »
Thanks I followed the instructions and it updated code blocks, now it completes for includes. Thanks a lot man.