Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • 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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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