Solved

automaticaly generating header files

Posted on 2002-06-26
4
229 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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 demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now