Skip to main content.
home | support | download

Back to List Archive

Re: C Library question

From: greg <greg(at)not-real.reddfish.co.nz>
Date: Thu Mar 20 2003 - 02:18:25 GMT
Hello David 

> On Wed, 2003-03-19 at 07:45, greg wrote:
> > I would like to use the new API, but the VisualC++ projects don't appear
> > to be up to date with the source code (?)
> > - Maybe someone can point me to an up-to-date VC++ dsw/dsp project?
> 
> I'll update the dsw/dsp files in 2.3 CVS if you want.  I need to do that
> before the next release, anyway.

Thanks for the assistance, I persisted with 2.3.4 and now appear to
have  a working VC++ development setup for.

For the record (and if you see any glaring mistakes please let me know, 
here's what I did

I ended up with libxml2 and pcre installed separately.
Under VC++ Tools | Options,  I set the include paths and library paths
so that
VC++ could find the .lib and .h files.

I looked at the Makefile.in and started off by deleting many of the .c
files
from the libswishe project. I then found I had to re-add most of
them...  
The files I ended up using are listed below.

I also had to change some of the libraries listed in the project
settings
dialog, some of them said 
./../../expat/xmlparse/ 
Tools options
change libpcre to pcre.lib

Set include directories to include f:\data\libxml2\include

I hoped I could get it all to compile without changing any headers, but
found I
needed to make changes:

1. In swish.h  (from memory)
uncomment the
    #ifdef _WIN32
    #include "win32/config.h"
and add
    #endif

2. also change:

  #include <dirent.h>
to
  #ifdef _Win32
  #include "win32/dirent.h"
 #else
  #include <dirent.h>
  #endif

3. In extprog.c and http_server.c

  #include acconfig.h

to
  #ifdef _Win32
  #include acconfig.h
  #endif

4. And in xml.h change  the #include  for xmlparse.h
to
   #include "xpat/xmlparse/xmlparse.h"

I did end up with some ugly warinings about not finding strlen and open
in mkstemp.c
possibly forgotten to #include strings.h or something?



Greg Ford


Files included in the  libswishe project
check
compress
date_time
db_native
db_read
docprop
docprop_write.c
double_metaphone
dump.c
entities.c
error
extprog.c
file.c
filter.c
fs.c
hash
headers
html.c
http.c
http_server.c
index.c
keychar_out.c
list
mem
merge.c
metanames
methods.c
mkstemp.c
no_better_place_module
pre_sort.c
proplimit
ramdisk
rank
result_output.c
result_sort
search
soundex
stemmer
string
swish_qsort
swish_words
swish2
swregex.c
txt.c
xml.h
Received on Thu Mar 20 02:22:12 2003