Eclipse giving me Invalid arguments ‘ Candidates are: void * memset(void *, int, ?) ‘ though I know the args are good

In Eclipse:

  • right click the project
  • click properties
  • Expand C/C++ general the item in the left hand tree view by clicking the arrow, (just clicking the item itself does not expand the suboptions)
  • From the suboptions select Preprocessor Include Paths, Macros etc.
  • Click the Providers tab
  • Check the box next to CDT GCC Built-in Compiler Settings [ Shared ].

Edit:

The reason this works is that there are a bunch of default includes and defines that the compiler silently adds behind the scene when you compile. These instructions get eclipse to grab these otherwise silent preprocessor directives so that it’s own indexer is using the same settings

Leave a Comment