User forums > Using Code::Blocks
Auto Complete offeres members from all libraries
AZ:
--- Quote from: oBFusCATed on November 20, 2016, 01:48:59 pm ---Keep in mind that we use our own parser of c++, which is not fully complete and doesn't support all features of the language.
So if it works in another tool doesn't mean it will work in codeblocks.
To find which part of the library causes the problem:
Copy the text of the header file in the main.cpp and start removing code until you've found the problematic piece.
--- End quote ---
Thank you for the instructions!
I think i do not know what is the proper workflow to add the libraries to the CB.
I thought that i add the path to library folder ( lets say i have a "lib" subfolder in a project directory structure:
Prj1
|
|-> src
| -> main.cpp
|->lib
|-> Lib1
|-> superlib.cpp
|-> superlib.h
)
I need to add "lib" into "Search directories -> Linker/Compiler" and "reparse the project".
But it appears that i should restart the CB?
And here is the minimum code that somehow affects the autocomplete:
--- Code: ---#include <NewliquidCrystal/LCD.h>
//#include "NewliquidCrystal/LCD.h"
class LiquidCrystal_I2C : public LCD
{
LiquidCrystal_I2C (uint8_t lcd_Addr);
int init();
};
LiquidCrystal_I2C abc(000);
abc.
--- End code ---
once you type "abc." - no popups, no errors would show up. If i type "in" i'll get a nice and correct information about the "init()" method.
This behavior ( i have to type 2 symbols of the method to get a popup) is consistent with the original LiquidCrystal_I2C class.
At the same time, if i were to declare a var of LCD ( LCD.h) the popup will shouw up with all available methods immediately after i put a "."
the only difference i see between these two classes is that one (crystal) is a child of LCD whereas LCD is a child of the PRINT - "standard" library.
oBFusCATed:
You're missing the no includes part. To get to the minimal code you need to dig deeper into the libs headers and remove any #include in the code.
And first please make sure that the code builds fine.
AZ:
after i restarted this laptop the autocompletion worked until i modified the class definition ( replaced "LiquidCrystal_I2C" with the include "LiquidCrystal_I2C/LiquidCrystal_I2C.h" ). after the replacement , autocomplete broke again.
I hear what you are saying about removing all "#includes ". But this is very quickly becoming a very time consuming copy/paste/delete task.
Is there some option to enable additional logging instead?
Navigation
[0] Message Index
[*] Previous page
Go to full version