Reputation: 8294
On my Ubuntu machine, htdig (www.htdig.org) is installed. e.g. "which htdig" gives me, /usr/bin/htdig
I want to install htdig under /var/www/my_web_site i.e. /var/www/my_web_site/htdig
Extra info:
For htdig-3.1.6:
When I run "./configure", I got:
configure: error: To compile ht://Dig, you will need a C++ library. Try installing libstdc++
"Run /sbin/ldconfig -p | grep stdc++"
I have:
I also tried out htdig-3.2.0b6:
I run "./configure", and it seems fine. I got something like "Now you must run 'make' followed by 'make install'"
When I run "make", I got quite a few errors like:
.....
Making all in htsearch
make[1]: Entering directory '/var/www/test/testme/sounddesign/htdig-3.2.0b6/htsearch'
g++ -DHAVE_CONFIG_H -I. -I. -I../include -DDEFAULT_CONFIG_FILE=\"/opt/www/conf/htdig.conf\" -I../include -I../htlib -I../htnet -I../htcommon -I../htword -I../db -I../db -DCONFIG_DIR=\"/opt/www/conf\" -I../htfuzzy -g -O2 -Wall -fno-rtti -fno-exceptions -c -o Display.o `test -f 'Display.cc' || echo './'`Display.cc
In file included from Display.cc:30:0:
Collection.h:39:10: error: extra qualification ‘Collection::’ on member ‘Open’ [-fpermissive]
void Collection::Open();
....
....
....
Display.cc:830:32: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
if (input->exists("endyear"))
^
Any idea what I should do?
Upvotes: 1
Views: 185
Reputation: 31045
The compiler is complaining that the class prefix Collection::
in Collection.h is both unnecessary, and now, illegal.
Simply change the htsearch/Collection.h header to this:
class Collection : public Object
{
public:
//
// Construction/Destruction
//
Collection(const char *name, const char *wordFile,
const char *indexFile, const char *docFile,
const char *docExcerpt);
~Collection();
// COMMENT OUT OR REMOVE THESE TWO LINES:
// void Collection::Open();
// void Collection::Close();
// ADD THESE TWO:
void Open();
void Close();
(comment out/remove old lines declaring Open/Close and add the last two lines above)
After doing this, htdig 3.2 b 6 compiled successfully for me. The warnings are just that: warnings. They won't prevent successful compilation. This is now a very old codebase, and some of the C++ is invariably not compliant with current compiler standards.
Upvotes: 1