User forums > Using Code::Blocks
Code Completion works bad
tanq:
I've upgraded to latest version 6752. However code completion engine fails in many situations.
1. Struct member autocomletion fail even on simpliest structures:
a) Works normal:
--- Code: ---struct TEST
{
int a,
int b,
};
TEST t;
--- End code ---
b) FAIL: Only "a" member is visible inside t
--- Code: ---struct TEST
{
int a,
int b
};
TEST t;
--- End code ---
2. Structures from ARM headers aren't visible. Example:
--- Code: ---/* "LPC11xx.h" */
typedef struct
{
__IO uint32_t MOD; /*!< Offset: 0x000 Watchdog mode register (R/W) */
__IO uint32_t TC; /*!< Offset: 0x004 Watchdog timer constant register (R/W) */
__O uint32_t FEED; /*!< Offset: 0x008 Watchdog feed sequence register ( /W) */
__I uint32_t TV; /*!< Offset: 0x00C Watchdog timer value register (R/ ) */
} LPC_WDT_TypeDef;
#define LPC_WDT ((LPC_WDT_TypeDef *) LPC_WDT_BASE )
--- End code ---
Now LPC_WDT-> expands to nothing
3. Functions from math.h and other system libraries doesn't work (but from my file works fine)
Example:
--- Code: ---/* <math.h> */
#ifndef __math_68881
extern double atan _PARAMS((double));
extern double cos _PARAMS((double));
extern double sin _PARAMS((double));
extern double tan _PARAMS((double));
extern double tanh _PARAMS((double));
extern double frexp _PARAMS((double, int *));
extern double modf _PARAMS((double, double *));
extern double ceil _PARAMS((double));
extern double fabs _PARAMS((double));
extern double floor _PARAMS((double));
#endif /* ! defined (__math_68881) */
--- End code ---
Code completion doesn't understand that.
sprintf, atoi and other functions aren't visible too.
It seems CC completely unaware of macros. Is it possible to make it work?
oBFusCATed:
--- Quote from: tanq on October 25, 2010, 03:01:59 pm ---
--- Code: ---struct TEST
{
int a,
int b,
};
--- End code ---
--- End quote ---
Have you tried to replace ',' with ';'? :)
tanq:
Obviosly, there is an error, I was trying different situations to find out why it not working
What about system headers?
oBFusCATed:
extern declarations are ignored if I remember correctly.
Also, the macro preprocessor is not full featured, just yet.
tanq:
Tanks for reply. I tuned parser options to replace "exern" and "_PARAMS" words to whitespace. Now Library funcitons are shown.
Structs from LPC headers still don't work.
Navigation
[0] Message Index
[#] Next page
Go to full version