Why can't Codan find size_t

前端 未结 5 839
南旧
南旧 2020-12-31 11:17

I\'ve just started using Eclipse Indigo (coming from Galileo) and I\'m getting little red bugs in the gutter for every use of size_t.

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-31 11:52

    Check your indexer settings under Preferences -> C/C++ -> Indexer.

    There is a field there called "Filed to index up-front". Its contents should be:

    cstdarg, stdarg.h, stddef.h, sys/resource.h, ctime, sys/types.h, signal.h, cstdio
    

    If there is something else in there, try replacing it with the above, then rebuild the index, and see if that fixes the problem.

    (In particular, if what you have in that field is stdarg.h, stddef.h, sys/types.h, then I have a pretty good guess as to what went wrong. Back in Eclipse Ganymede, the value of this field was stdarg.h, stddef.h, sys/types.h. In newer versions (Galileo and Indigo), it was changed to the above. However, since this field is part of "preferences", if you exported your Ganymede preferences and imported them into Galileo/Indigo, this field was overwritten with the old Ganymede value. I was burned by this a while ago.)

提交回复
热议问题