Having .ec and .c files see same structure definitions
Posted in 1997
If this is covered in the FAQ, could somebody point me to it? The question: We have structure definitions that need to be seen by both .ec and .c files. I have come up with a solution that seems to work for me but others are having difficulty implementing it. Is there a 'standard' soution out there that is a recommended? We are running Informix 7.13. My solution for those interested: .ec files:------------------------------------------- #define SQL_FILE $include foo.h; #undef SQL_FILE .c files:-------------------------------------------- #include <foo.h> foo.h:----------------------------------------------- #ifdef SQL_FILE EXEC SQL BEGIN DECLARE SECTION; #endif typedef struct { . . . } S1; . . . #ifdef SQL_FILE EXEC SQL END DECLARE SECTION; #endif