5

Is there a command line tool to automatically generate a .h from its .cpp or .c?

It seems like a very obvious thing to do, I don't know why it never dawned on me before now...

Of course, in the .h there should be more things than just function prototypes, so the tool could be non-trivial. Or could be trivial, requiring you to include two .h: the generated one and the custom one.

Anyway, I'd rather avoid reinventing the wheel, that's why I'm asking if it already exists.

6
  • 3
    hwaci.com/sw/mkhdr did you try googling this? :-) Commented Feb 22, 2012 at 21:07
  • the classic SO rhetoric question :) Commented Feb 22, 2012 at 21:10
  • @LiorCohen: I tried to think of a query to find it, but I didn't manage to... now that you point it out I admit I could've tried harder. Commented Feb 22, 2012 at 22:11
  • 1
    +1 - While creating a program to create AI-based programs has crossed my mind, this has not. Very useful if you know exactly what you want to do rather than base projects off of the headers. Commented Feb 22, 2012 at 22:20
  • 1
    @Lohoris: posted as an answer. Commented Feb 22, 2012 at 22:40

1 Answer 1

3

Here you go:

http://www.hwaci.com/sw/mkhdr/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.