tool to compare .h files

183 views Asked by At

I was wondering if there is a tool to compare C header files to the main version of those same files locally. To be more specific I have to compare the macros of the header files from the main version to the macros of the header files generated by a library. Also make sure which macros don't match or don't exist in the generated h. files. Both versions of these header files are in a local workspace. Also, the ubuntu version (ubuntu 18.04) I'm working with doesn't have a GUI so I would have to display the results on the command line.

I can also try to work it out in win10 if necessary. I appreciate any suggestions, thanks.

1

There are 1 answers

2
PaulProgrammer On BEST ANSWER

Yes, the tool you are looking for is called diff. It's available on the command line with linux since the beginning of time:

diff {my.h} {orig.h}

and there are many different formats available like "side-by-side" or "unified".

If you prefer a graphical utility there are many available for linux or windows. Just google for "diff gui" and you can find a few.