Solved

automaticaly generating header files

Posted on 2002-06-26
4
251 Views
Last Modified: 2010-04-22
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.
0
Comment
Question by:bearware
  • 2
4 Comments
 
LVL 6

Expert Comment

by:Triskelion
ID: 7111363
I have not tried this, but:
   http://www.hwaci.com/sw/mkhdr/index.html


I'm sure you could use sed and awk to do it too.
0
 
LVL 1

Author Comment

by:bearware
ID: 7112965
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.
0
 
LVL 5

Accepted Solution

by:
garboua earned 50 total points
ID: 7119142
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.
http://www.programmersheaven.com/zone3/cat479/16520.htm
0
 
LVL 1

Author Comment

by:bearware
ID: 7166992
I tryed it it worked.
Had to grep its output a bit though.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
yum remove leaves empty directories 1 94
Shell script for mvn build 2 78
App holding yum lock unable to update my rpm package 1 86
mounting drive a in a linux 14 34
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question