error "syntax error before numeric constant"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tvnaidu
    Contributor
    • Oct 2009
    • 365

    error "syntax error before numeric constant"

    I am getting this error for line 108, I kept C code also below, any idea?.
    main.c:108: underscore in number
    main.c:108: syntax error before numeric constant



    104: #define EXPAND_CONCAT(n ame1,name2) name1 ## name2
    105: #define CONCAT(name1,na me2) EXPAND_CONCAT(n ame1,name2)
    106: #define RT_MODEL CONCAT(MODEL,_r tModel)

    108: extern RT_MODEL *MODEL(void);
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    What is MODEL defined to?

    From what you have posted line 108 expands to

    extern MODEL_rtModel *MODEL(void);

    unless MODEL is defined to something. From the error message it looks like MODEL is defined to some number.

    Comment

    • tvnaidu
      Contributor
      • Oct 2009
      • 365

      #3
      appreciated. I defined MODEL (actually it was defined, but word split into two with space), this is generated code, now it compiles. thanks.

      Comment

      Working...