制作CLucene时出错

时间:2014-02-11 15:57:40

标签: cmake clucene

我正在使用MBP OSX(10.9)并且是CLucene的新手,我在安装它时遇到问题。尽管遵循安装指南,我仍然在制作文件时遇到这些错误

[  0%] Building CXX object src/shared/CMakeFiles/clucene-shared.dir/CLucene/SharedHeader.o
In file included from /Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/SharedHeader.cpp:8:
In file included from /Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/_SharedHeader.h:13:
In file included from /Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/SharedHeader.h:201:
In file included from /Users/youhock/Downloads/clucene-core-2.3.3.4/src/core/CLucene/debug/lucenebase.h:10:
/Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:56:19: error: 
      unknown type name 'pthread_t'
                static _LUCENE_THREADID_TYPE _GetCurrentThreadId();
                       ^
/Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:40:41: note: 
      expanded from macro '_LUCENE_THREADID_TYPE'
          #define _LUCENE_THREADID_TYPE pthread_t
                                        ^
/Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:57:18: error: 
      unknown type name 'pthread_t'
                        static _LUCENE_THREADID_TYPE CreateThread(lucene...
                               ^
/Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:40:41: note: 
      expanded from macro '_LUCENE_THREADID_TYPE'
          #define _LUCENE_THREADID_TYPE pthread_t
                                        ^
/Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:58:34: error: 
      unknown type name 'pthread_t'
                        static void JoinThread(_LUCENE_THREADID_TYPE id);
                                               ^
/Users/youhock/Downloads/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:40:41: note: 
      expanded from macro '_LUCENE_THREADID_TYPE'
          #define _LUCENE_THREADID_TYPE pthread_t
                                        ^
3 errors generated.
make[2]: *** [src/shared/CMakeFiles/clucene-shared.dir/CLucene/SharedHeader.o] Error 1
make[1]: *** [src/shared/CMakeFiles/clucene-shared.dir/all] Error 2
make: *** [all] Error 2

感谢是否有人可以帮我这个?提前致谢

1 个答案:

答案 0 :(得分:0)

查看my other answer

基本上你必须修补

  • SRC /共享/ CLucene / LuceneThreads.h

  • SRC /共享/ CLucene /配置/ repl_tchar.h

其他帖子也包含链接。