By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,335 Members | 2,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,335 IT Pros & Developers. It's quick & easy.

#define issue

P: 1
i am compling a lib on AIX 5.2 using GNU complier and i get the following error:

"lexer.l", line 82.1: 1506-045 (S) Undeclared identifier cfg.

cfg is defined by #define:
#define YY_DECL int cfg_yylex YY_PROTO(( cfg_t *cfg ))

how does this define work?

it 's error when cf is referenced:
Sep 20 '06 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 8,916
#define YY_DECL int cfg_yylex YY_PROTO(( cfg_t *cfg ))

does not define cfg, it defines YY_DECL

If you do not use YY_DECL then cfg will not be defined. Even if you do use YY_DECL cfg will only be defined in specific circumstances.

We will need to see the code using cfg and and code that uses YY_DECL to be able to fully answer the question.
Sep 20 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.