User forums > Help

Inconsistent autocomplete behavior between Windows and Linux

<< < (3/4) > >>

AbdelrahmanSaid:

--- Quote from: BlueHazzard on June 10, 2020, 05:03:23 pm ---
--- Quote ---Use the current gcc compiler in your system and build the new one from the source... It is a lot easy (more straight forward) to do it in Linux than Windows...
--- End quote ---
The question was more, how did you use it in codeblocks. How did you give codeblocks the paths... Did you created a package and installed it, or did you used configure --prefix or did you used the default for configure....
installing is not building...

--- End quote ---

I have just finished doing it. Built gcc-9.3 from source and started using it in codeblocks and it works perfectly.

To do that, all you need to do is, in codeblocks, go to Settings > Compiler, choose the 'Toolchain Executables' tab and point codeblocks to where you have installed the new version of gcc. That is what I have done and it seems to work perfecctly fine for me.

huycan:
Actually, you don't have to change any setting in CodeBlocks. I just create a script to change all the soft links in /usr/bin point to appropriate version.... for example, /usr/bin/gcc points to gcc-9.3 instead of gcc-7.5, g++ points to g++-9.3 , etc...  This way, your whole system is using the 9.3 version (even if you use different IDE)... and if you want to switch back to older version, change the links.

AbdelrahmanSaid:

--- Quote from: huycan on June 10, 2020, 08:57:46 pm ---Actually, you don't have to change any setting in CodeBlocks. I just create a script to change all the soft links in /usr/bin point to appropriate version.... for example, /usr/bin/gcc points to gcc-9.3 instead of gcc-7.5, g++ points to g++-9.3 , etc...  This way, your whole system is using the 9.3 version (even if you use different IDE)... and if you want to switch back to older version, change the links.

--- End quote ---

Yeah.. of course that would be the other option here. I just didn't want to change the gcc version that my system uses, so I switched it in codeblocks.

AbdelrahmanSaid:
Okay. I have encountered another strange issue.

When I declare a variable, let's say an integer called num. If I initialise it with the assignment operator, i.e. int num = 0;, then everything works fine.

However, if initialise it like this int num {0};, then codeblocks would not take that variable into consideration for code completion. If I type start typing the name of the variable, the auto code completion won't appear, and if I try to force it with Ctrl+Space, then codeblocks won't find it. Additionally, if the variable has methods, a string or a vector variable for instance, then none of these methods would show up, because the variable isn't even recognised as a variable.

Any ideas what is happening here?

oBFusCATed:

--- Quote from: AbdelrahmanSaid on June 10, 2020, 11:46:31 pm ---Any ideas what is happening here?

--- End quote ---
The CC hasn't been updated to support the stupidly broken modern initialization style which doesn't work (tm) :)
Patches welcome.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version