Hello.
    After manually remove the
#define _CL_HAVE_WIN32_THREADS 1
to force cluence to use pthread, the compile goes further.
Now I am encounter this problem,

In file included from D:\wxwidgets\projects\DocFrog\clucene-core-2.3.3.4\src\sha
red\CLucene\config\threads.cpp:9:0:
D:\wxwidgets\projects\DocFrog\clucene-core-2.3.3.4\src\shared\CLucene\config\/_t
hreads.h: In member function 'bool lucene::util::CLuceneThreadIdCompare::operato
r()(pthread_t, pthread_t) const':
D:\wxwidgets\projects\DocFrog\clucene-core-2.3.3.4\src\shared\CLucene\config\/_t
hreads.h:99:19: error: no match for 'operator<' in 't1 < t2'
D:\wxwidgets\projects\DocFrog\clucene-core-2.3.3.4\src\shared\CLucene\config\thr
eads.cpp: In copy constructor 'lucene::util::mutex_thread::mutex_thread(const lu
cene::util::mutex_thread&)':

The problem is to compare 2 pthread_t. I check pthread.h. On linux,
pthread_it is defined as unsigned long which is comparable. But on
mingw, it is defined as a struct. so can't be compared.

Looks no way out. Can Clucene be really compiled using mingw32 on windows?


Regards.
Scott

On Thu, Apr 28, 2011 at 12:06 AM, Scott Zhang <macromars...@gmail.com> wrote:
> Hello.
>   I am stalling on compile on Clucene 2.3.3.4
> on windows 7 using mingw32 since this morning. I have googled and tried
> every method I can use.
>  I am getting following error:
>
> D:\wxwidgets\projects\DocFrog\clucene-core-2.3.3.4\mbuild>mingw32-make
> [  0%] Building CXX object 
> src/shared/CMakeFiles/clucene-shared.dir/CLucene/Shar
> edHeader.obj
> In file included from 
> D:\wxwidgets\projects\DocFrog\clucene-core-2.3.3.4\src\cor
> e/CLucene/debug/lucenebase.h:10:0,
>                from D:\wxwidgets\projects\DocFrog\clucene-core-2.3.3.4\src\sha
> red/CLucene/SharedHeader.h:201,
>                from D:\wxwidgets\projects\DocFrog\clucene-core-2.3.3.4\src\sha
> red/CLucene/_SharedHeader.h:13,
>                from D:\wxwidgets\projects\DocFrog\clucene-core-2.3.3.4\src\sha
> red\CLucene\SharedHeader.cpp:8:
> D:\wxwidgets\projects\DocFrog\clucene-core-2.3.3.4\src\shared/CLucene/LuceneThre
> ads.h:56:19: error: 'pthread_t' does not name a type
> D:\wxwidgets\projects\DocFrog\clucene-core-2.3.3.4\src\shared/CLucene/LuceneThre
> ads.h:57:18: error: 'pthread_t' does not name a type
> D:\wxwidgets\projects\DocFrog\clucene-core-2.3.3.4\src\shared/CLucene/LuceneThre
> ads.h:58:34: error: 'pthread_t' has not been declared
> mingw32-make[2]: *** 
> [src/shared/CMakeFiles/clucene-shared.dir/CLucene/SharedHea
> der.obj] Error 1
> mingw32-make[1]: *** [src/shared/CMakeFiles/clucene-shared.dir/all] Error 2
> mingw32-make: *** [all] Error 2
>
>
> Looks apparently the pthread.h was not include. I have checked my
> mingw32 directory, the pthread.h sched.h and related lib dll are
> there.
>
> I tried to use g++ -E to see the preprocessed output and see pthread.h
> was not included.
>
> Really don't know what to do next.
>
> Please help.
>
> I tried build it on linux which compiled successfully and smoothly.
>
>
> Thanks.
> Regards.
> Scott
>

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers

Reply via email to