Home > Blockchain >  tool to compare .h files
tool to compare .h files

Time:11-25

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.

CodePudding user response:

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.

  • Related