Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse CDT Code Completion Issue

For some reason the code completion for the Eclipse CDT I'm running (in Ubuntu linux) isn't working properly. Every time I include a library nothing pops up. Is there any reason why this could be?

like image 256
zeboidlund Avatar asked Dec 06 '25 18:12

zeboidlund


1 Answers

Including a header in your source code is not enough. You need to tell the indexer where to look for the header. To do so, you need to go to your project's properties, navigate to the C/C++ General > Paths and Symbols item. In the Includes tab, add the folder containing your headers for the GNU C++ language. You may also need to define a few symbols in the Symbols tab if your library needs it.

Now you'll just have to wait for the indexer to do it's thing and auto-completion should start working. Keep in mind that the indexer isn't perfect and complicated C++ headers like the STL can confuse it pretty easily.

like image 178
Ze Blob Avatar answered Dec 08 '25 07:12

Ze Blob



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!