X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Trace-PostClient-IP: 68.147.232.190 From: Brian Inglis Newsgroups: comp.os.msdos.djgpp Subject: Re: Djgpp C compiler regEx comilation PB Organization: Systematic Software Message-ID: References: <45605ffa$0$2291$426a34cc AT news DOT free DOT fr> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 52 Date: Sun, 19 Nov 2006 16:05:05 GMT NNTP-Posting-Host: 64.59.135.176 X-Complaints-To: abuse AT shaw DOT ca X-Trace: pd7urf3no 1163952305 64.59.135.176 (Sun, 19 Nov 2006 09:05:05 MST) NNTP-Posting-Date: Sun, 19 Nov 2006 09:05:05 MST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Sun, 19 Nov 2006 14:45:05 +0100 in comp.os.msdos.djgpp, "Martin Boulte" wrote: >Hi guy, >I try to compile the myGrep.c program I found on Web at this site >http://linuxgazette.net/issue55/tindale.html >which uses regular expression and include regex.h. > >I get the following message : > >In file included from myGrep.c:11: >c:/djgpp/include/regex.h:17: syntax error before "regoff_t" >c:/djgpp/include/regex.h:25: syntax error before "regoff_t" >c:/djgpp/include/regex.h:66: syntax error before "regmatch_t" > >In fact, when I go through regex.h, I get this : >#ifdef __cplusplus >extern "C" { >#endif >.... > >#ifdef __cplusplus >} >#endif >which means that if I don't define C++ I do not get regex declaration. >Does it mean that regex declaration is available only in C++ ? You are mistaken: those header lines make the definitions valid when used with a C++ translator as well as a C translator. >The first declare error comes from typedef off_t regoff_t Insert: #include before: #include and while you're there, correct: #include to #include as the former is non-standard (none of the functions document their declaration in the former) and merely includes the latter. -- Thanks. Take care, Brian Inglis Calgary, Alberta, Canada Brian DOT Inglis AT CSi DOT com (Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca) fake address use address above to reply