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.
make[2]: Entering directory /home/michael/dev/kahakai/kahakai/src' g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2 -I/usr/X11R6/include -I/usr/include/freetype2 -DSHAPE -DXINERAMA -DRANDR -DRENDER -DXFT -DINTERLACE -DPIXMAP -DPYTHON -DRUBY -I/usr/lib/ruby/1.8/i686-linux-gnu -DDEFAULTSTYLE=\"/usr/local/share/kahakai/styles/Default.style\" -DDEFAULTMENU=\"/usr/local/share/kahakai/menu\" -DDEFAULTACTION=\"/usr/local/share/kahakai/actions/action\" -DDEFAULTRCFILE=\"/usr/local/share/kahakai/config\" -DDEFAULTSCRIPTDIR=\"/usr/local/share/kahakai/scripts\" -DPKGDATADIR=\"/usr/local/share/kahakai\" -DDEFAULTSCRIPTCONFIG=\"/usr/local/share/kahakai/scripts/config.py\" -g -O2 -I/usr/X11R6/include -g -O0 -ffast-math -pipe -Wall -pthread -c main.cc In file included from Resources.hh:42, from Screen.hh:50, from Waimea.hh:158, from main.cc:18: Regex.hh: In destructor
Regex::~Regex()’:
Regex.hh:33: `regfree’ undeclared (first use this function)
Regex.hh:33: (Each undeclared identifier is reported only once for each
function it appears in.)
regfree is defined in /usr/include/regex.h. How can I work around this problem?
···
–
Michael
GnuPG Fingerprint: 4C56 7C23 8BD9 8B39 C4D4 B8F3 42FB 3634 31B5 E963