On Sun, 15 Jun 2003 10:30:28 +0900, Michael Brailsford wrote:

> I am working on embedding ruby into a C++ application but I cannot get
> the app to compile because of the naming of regex.h in
> /usr/lib/ruby/1.8/i686-linux-gnu.  It conflicts with
> /usr/include/regex.h.  Below I have pasted the compile error that I get.
> 
[snip]
> regfree is defined in /usr/include/regex.h.  How can I work around this problem?

You will have to make a wrapper around '/usr/include/regex.h', so 
that thier names doesn't clash.
Do like this:


Make a .H file, with the same interface as '/usr/include/regex.h'
perhaps named differently.

Make a .CPP file, which redirects all calls to '/usr/include/regex.h'
Only link this .CPP file with the regex library.



The same technique (just with classes instead)
http://www.gotw.ca/gotw/028.htm

--
Simon Strandgaard