如果直接编译的话,第一个错误的原因是没有写<pthread.h>
第二个错误是_tcsstr会有二异性,修改方法如下:
/*------------------------------------------------------------------------------
* Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team
*
* Distributable under the terms of either the Apache License (Version 2.0) or
* the GNU Lesser General Public License, as specified in the COPYING file.
------------------------------------------------------------------------------*/
#ifndef _REPL_TCHAR_H
#define _REPL_TCHAR_H
#ifndef _CL_HAVE_TCHAR_H
#if defined(_UCS2)
//note: descriptions with * in front have replacement functions
//formatting functions
#define _sntprintf swprintf //* make a formatted a string
#define _tprintf wprintf //* print a formatted string
//this one has no replacement functions yet, but it is only used in the tests
#define _vsntprintf vsnwprintf //* print a formatted string using variable arguments
//we are using the internal functions of the compiler here
//if LUCENE_USE_INTERNAL_CHAR_FUNCTIONS is defined, thesse
//will be replaced by internal functions
#define _istalnum iswalnum //* alpha/numeric char check
#define _istalpha iswalpha //* alpha char check
#define _istspace iswspace //* space char check
#define _istdigit iswdigit //* digit char check
#define _totlower towlower //* convert char to lower case
#define _totupper towupper //* convert char to lower case
#define _tcslwr std:wcslwr //* convert string to lower case
//these are the string handling functions