• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 273
  • Last Modified:

automaticaly generating header files

Does any one know how I can automaticaly generate header files with prototypes for all functions with external linkage (e.g. not static). I am using gcc.

Also it would be a bonus it I could generate the headers for c++ files as well.
  • 2
1 Solution
I have not tried this, but:

I'm sure you could use sed and awk to do it too.
bearwareAuthor Commented:
I tryed to write a regular expression to find all function definitions once before, It was mind bogalingly hard and only found 90%. If it worked I would use it as you suggested. If you know where I can get regexps for the job that work, ill give it a go.
there is a program out there called cextract, which will do exactly what you want.  it is not easy to find so here is a shortcut.
bearwareAuthor Commented:
I tryed it it worked.
Had to grep its output a bit though.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now