Missing Header File

J

Jamie Cockburn

Hi,

I have writen a C programme that uses regular expresions and imports a file
called regex.h. On the uni computers the programme compiles fine but at
home on my own PC the compiler complains that it can't find the file. I'm
not usre which compiler they use at uni but it's on Red Hat Linux, at home I
am using the windows port of GCC (mingw).

Any help would be appreciated.
Thanks,
Jamie
 
B

Ben Pfaff

Jamie Cockburn said:
I have writen a C programme that uses regular expresions and imports a file
called regex.h. On the uni computers the programme compiles fine but at
home on my own PC the compiler complains that it can't find the file. I'm
not usre which compiler they use at uni but it's on Red Hat Linux, at home I
am using the windows port of GCC (mingw).

regex.h isn't a standard header. You'll have to find an
implementation of its associated library for your platform. You
should ask about that in a newsgroup associated with your
platform, because in comp.lang.c we only discuss standard C,
which excludes platform-specific issues like this.
 
S

Sidney Cadot

Jamie said:
I have writen a C programme that uses regular expresions and imports a file
called regex.h. On the uni computers the programme compiles fine but at
home on my own PC the compiler complains that it can't find the file. I'm
not usre which compiler they use at uni but it's on Red Hat Linux, at home I
am using the windows port of GCC (mingw).

regexp support is not a standard C feature; the GNU C library supports
this as an add-on but mingw uses another C library (newlib?), so that's
why it doesn't work. Since regexp-support is not standard C, you're not
likely to get a more useful answer than this in comp.lang.c (which is
only concerned with standard C).

Best regards,

Sidney
 
J

Jamie Cockburn

In that case, is there a library for regular expresions in standard C?

Jamie
 
E

E. Robert Tisdale

Jamie said:
I have written a C program that uses regular expressions
and imports a file called regex.h.
On the University computers, the program compiles fine but, at home
on my own PC, the compiler complains that it can't find the file.
I'm not sure which compiler they use at University
but it's on Red Hat Linux.
At home, I am using the windows port of GCC (mingw).

I used Google

http://www.google.com/

to search for

+"regex" +"windows"

and found lots of stuff including

http://ftp.uni-kl.de/pub/windows/cygwin/release/regex/
 
D

David Rubin

Jamie said:
In that case, is there a library for regular expresions in standard C?

The problem isn't that there is no regex package written in standard C.
The problem is that standard C does not provide one (e.g., as part of
the standard library.)

/david
 
C

CBFalconer

Jamie said:
In that case, is there a library for regular expresions in
standard C?

He just told you, no. You can probably find one that is written
in standard C, however.
 
R

Randy Howard

The problem isn't that there is no regex package written in standard C.

How do you know this to be true? I don't know of anything in the standard
that precludes it being done.
The problem is that standard C does not provide one (e.g., as part of
the standard library.)

True.
 
T

those who know me have no need of my name

in comp.lang.c i read:
How do you know this to be true? I don't know of anything in the standard
that precludes it being done.

so far as i am aware henry spencer's regex code is standard c.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top