News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

include autocomplete problem

Started by josh123, November 19, 2011, 04:25:21 PM

Previous topic - Next topic

josh123

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.

Alpha

Is Settings->Editor...->Code completion "Enable headers code-completion" checked?

josh123

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.

ollydbg

Quote from: josh123 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
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.

josh123

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.

oBFusCATed

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!]

josh123

Thanks I followed the instructions and it updated code blocks, now it completes for includes. Thanks a lot man.