Structs to C

Included with structs is the program structs_to_c. This program reads in a Prolog file containing structs declarations, and generates a .h file containing equivalent declarations to be #included in your C programs. Each type you declare in your .pl file will have a corresponding typedef in the .h file.

If you wish to use this tool, you will have to build an executable yourself, as the default installation procedure doesn't build structs_to_c, in order to save space. To build structs_to_c, visit the structs library directory, and type

             % make structs_to_c
     

This will make a host and operating system specific executable file structs_to_c, which you should move to an appropriate directory, for example /usr/local/bin.